Skip to content

Commit 63ae101

Browse files
Adds htmlbeautifier formatter - for eruby files (#101)
* Adds htmlbeautifier formatter - for eruby files --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 72e25ed commit 63ae101

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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 = "htmlbeautifier",
8+
meta = {
9+
url = "https://github.com/threedaymonk/htmlbeautifier",
10+
description = "A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.",
11+
},
12+
method = FORMATTING,
13+
filetypes = { "eruby" },
14+
generator_opts = {
15+
command = "htmlbeautifier",
16+
args = {
17+
"$FILENAME",
18+
},
19+
to_stdin = false,
20+
to_temp_file = true,
21+
},
22+
factory = h.formatter_factory,
23+
})

0 commit comments

Comments
 (0)