Skip to content

Commit

Permalink
Format Meson using muon fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lassik committed Jul 22, 2023
1 parent b9d4e7d commit 2c780df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Supported languages
* **Ledger** ([*ledger-mode*](https://github.com/ledger/ledger-mode))
* **Lua** ([*lua-fmt*](https://github.com/trixnz/lua-fmt), [stylua](https://github.com/JohnnyMorganz/StyLua), [*prettier plugin*](https://github.com/prettier/plugin-lua))
* **Markdown** ([*prettier*](https://prettier.io/), [*prettierd*](https://github.com/fsouza/prettierd), [*deno*](https://deno.land/manual/tools/formatter))
* **Meson** ([*muon fmt*](https://sr.ht/~lattis/muon/))
* **Nginx** ([*nginxfmt*](https://github.com/slomkowski/nginx-config-formatter))
* **Nix** ([*nixpkgs-fmt*](https://github.com/nix-community/nixpkgs-fmt), [*nixfmt*](https://github.com/serokell/nixfmt),
[*alejandra*](https://github.com/kamadorueda/alejandra))
Expand Down
9 changes: 9 additions & 0 deletions format-all.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
;; - Ledger (ledger-mode)
;; - Lua (lua-fmt, stylua, prettier plugin)
;; - Markdown (prettier, prettierd, deno)
;; - Meson (muon fmt)
;; - Nginx (nginxfmt)
;; - Nix (nixpkgs-fmt, nixfmt, alejandra)
;; - OCaml (ocp-indent, ocamlformat)
Expand Down Expand Up @@ -166,6 +167,7 @@
("Literate Haskell" brittany)
("Lua" lua-fmt)
("Markdown" prettier)
("Meson" muon-fmt)
("Nix" nixpkgs-fmt)
("Objective-C" clang-format)
("OCaml" ocp-indent)
Expand Down Expand Up @@ -1056,6 +1058,13 @@ Consult the existing formatters for examples of BODY."
(list)))
"-")))

(define-format-all-formatter muon-fmt
(:executable "muon")
(:install (macos "brew install muon"))
(:languages "Meson")
(:features)
(:format (format-all--buffer-easy executable "fmt" "-")))

(define-format-all-formatter nginxfmt
(:executable "nginxfmt")
(:install "pip install nginxfmt")
Expand Down

0 comments on commit 2c780df

Please sign in to comment.