Skip to content

Commit

Permalink
feat: add nomad_fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rliebz committed Dec 31, 2024
1 parent 9180320 commit 51ce71f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ You can view this list in vim with `:help conform-formatters`
- [nimpretty](https://github.com/nim-lang/nim) - nimpretty is a Nim source code beautifier that follows the official style guide.
- [nixfmt](https://github.com/NixOS/nixfmt) - The official (but not yet stable) formatter for Nix code.
- [nixpkgs_fmt](https://github.com/nix-community/nixpkgs-fmt) - nixpkgs-fmt is a Nix code formatter for nixpkgs.
- [nomad_fmt](https://developer.hashicorp.com/nomad/docs/commands/fmt) - The fmt commands check the syntax and rewrites Nomad configuration and jobspec files to canonical format.
- [npm-groovy-lint](https://github.com/nvuillam/npm-groovy-lint) - Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files using command line.
- [nufmt](https://github.com/nushell/nufmt) - The nushell formatter.
- [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) - Auto-formatter for OCaml code.
Expand Down
2 changes: 2 additions & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ FORMATTERS *conform-formatter
official style guide.
`nixfmt` - The official (but not yet stable) formatter for Nix code.
`nixpkgs_fmt` - nixpkgs-fmt is a Nix code formatter for nixpkgs.
`nomad_fmt` - The fmt commands check the syntax and rewrites Nomad configuration
and jobspec files to canonical format.
`npm-groovy-lint` - Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle
files using command line.
`nufmt` - The nushell formatter.
Expand Down
9 changes: 9 additions & 0 deletions lua/conform/formatters/nomad_fmt.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://developer.hashicorp.com/nomad/docs/commands/fmt",
description = "The fmt commands check the syntax and rewrites Nomad configuration and jobspec files to canonical format.",
},
command = "nomad",
args = { "fmt", "-" },
}

0 comments on commit 51ce71f

Please sign in to comment.