Skip to content

Commit 071da2e

Browse files
committed
builtins/meson_format: initialize support for native meson format
1 parent fd7999b commit 071da2e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
local h = require("null-ls.helpers")
2+
local methods = require("null-ls.methods")
3+
4+
local FORMATTING = methods.internal.FORMATTING
5+
6+
return h.make_builtin({
7+
name = "meson_format",
8+
meta = {
9+
url = "https://mesonbuild.com/Commands.html#format",
10+
description = "Meson's builtin formatter",
11+
},
12+
method = FORMATTING,
13+
filetypes = { "meson" },
14+
generator_opts = {
15+
command = "meson",
16+
args = { "format", "--", "$FILENAME" },
17+
to_stdin = true,
18+
},
19+
factory = h.formatter_factory,
20+
})

0 commit comments

Comments
 (0)