Skip to content

Commit f87b53e

Browse files
committed
Add dtsfmt
1 parent 6b67df2 commit f87b53e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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 = "dtsfmt",
8+
meta = {
9+
url = "https://github.com/dts-lang/rustfmt",
10+
description = "Auto formatter for device tree source files",
11+
notes = { "Requires that `dtsfmt` is executable and on $PATH." },
12+
},
13+
method = FORMATTING,
14+
filetypes = { "dts" },
15+
generator_opts = {
16+
command = "dtsfmt",
17+
args = { "--emit=stdout" },
18+
to_stdin = true,
19+
},
20+
factory = h.formatter_factory,
21+
})

0 commit comments

Comments
 (0)