Skip to content

Commit ac21d57

Browse files
committed
Add meson fmt for Meson
Also enable flag to use editorconfig by default, this is often already implied by other formatters.
1 parent fd9c013 commit ac21d57

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Supported languages
6767
* **Ledger** ([*ledger-mode*](https://github.com/ledger/ledger-mode))
6868
* **Lua** ([*lua-fmt*](https://github.com/trixnz/lua-fmt), [stylua](https://github.com/JohnnyMorganz/StyLua), [*prettier plugin*](https://github.com/prettier/plugin-lua))
6969
* **Markdown** ([*prettier*](https://prettier.io/), [*prettierd*](https://github.com/fsouza/prettierd), [*deno*](https://deno.land/manual/tools/formatter))
70-
* **Meson** ([*muon fmt*](https://sr.ht/~lattis/muon/))
70+
* **Meson** ([*muon fmt*](https://sr.ht/~lattis/muon/), [*meson fmt*](https://mesonbuild.com/))
7171
* **Nginx** ([*nginxfmt*](https://github.com/slomkowski/nginx-config-formatter))
7272
* **Nix** ([*nixpkgs-fmt*](https://github.com/nix-community/nixpkgs-fmt), [*nixfmt*](https://github.com/serokell/nixfmt),
7373
[*alejandra*](https://github.com/kamadorueda/alejandra))

format-all.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
;; - Ledger (ledger-mode)
6969
;; - Lua (lua-fmt, stylua, prettier plugin)
7070
;; - Markdown (prettier, prettierd, deno)
71-
;; - Meson (muon fmt)
71+
;; - Meson (muon fmt, meson fmt)
7272
;; - Nginx (nginxfmt)
7373
;; - Nix (nixpkgs-fmt, nixfmt, alejandra)
7474
;; - OCaml (ocp-indent, ocamlformat)
@@ -1107,6 +1107,13 @@ Consult the existing formatters for examples of BODY."
11071107
(:features)
11081108
(:format (format-all--buffer-easy executable "fmt" "-")))
11091109

1110+
(define-format-all-formatter meson-fmt
1111+
(:executable "meson")
1112+
(:install "pip install meson")
1113+
(:languages "Meson")
1114+
(:features)
1115+
(:format (format-all--buffer-easy executable "fmt" "--editor-config" "-")))
1116+
11101117
(define-format-all-formatter nginxfmt
11111118
(:executable "nginxfmt")
11121119
(:install "pip install nginxfmt")

0 commit comments

Comments
 (0)