Install from VS Code Marketplace
nomfmt
is a Visual Studio Code extension that integrates nomad fmt
to provide on-the-fly code formatting for Nomad job spec files written in HCL (HashiCorp Configuration Language).
-
Prerequisites:
nomad
CLI tool should be installed and available in your system'sPATH
.HashiCorp.HCL
extension for Visual Studio Code must be installed for syntax highlighting.
-
VS Code Configuration:
- Set up file associations for syntax highlighting:
{
"files.associations": {
"*.nomad.hcl": "hcl",
"*.nomad": "hcl"
},
"editor.formatOnSave": true
}
ID | Description | Default |
---|---|---|
nomfmt.enable |
Enable/disable nomfmt formatting. | true |
nomfmt
is specifically designed to format .nomad
and .nomad.hcl
files. Ensure your job spec files have one of these extensions for the formatter to apply.