@@ -7,70 +7,83 @@ local M = {}
7
7
8
8
M .lua_format = h .make_builtin ({
9
9
method = FORMATTING ,
10
- filetypes = {" lua" },
10
+ filetypes = { " lua" },
11
11
generator_opts = {
12
12
command = " lua-format" ,
13
- args = {" --single-quote-to-double-quote " , " -i" },
14
- to_stdin = true
13
+ args = { " -i" },
14
+ to_stdin = true ,
15
15
},
16
- factory = h .formatter_factory
16
+ factory = h .formatter_factory ,
17
17
})
18
18
19
19
M .stylua = h .make_builtin ({
20
20
method = FORMATTING ,
21
- filetypes = {" lua" },
22
- generator_opts = {command = " stylua" , args = {" -" }, to_stdin = true },
23
- factory = h .formatter_factory
21
+ filetypes = { " lua" },
22
+ generator_opts = { command = " stylua" , args = { " -" }, to_stdin = true },
23
+ factory = h .formatter_factory ,
24
24
})
25
25
26
26
M .prettier = h .make_builtin ({
27
27
method = FORMATTING ,
28
28
filetypes = {
29
- " javascript" , " javascriptreact" , " typescript" , " typescriptreact" , " css" ,
30
- " html" , " json" , " yaml" , " markdown"
29
+ " javascript" ,
30
+ " javascriptreact" ,
31
+ " typescript" ,
32
+ " typescriptreact" ,
33
+ " css" ,
34
+ " html" ,
35
+ " json" ,
36
+ " yaml" ,
37
+ " markdown" ,
31
38
},
32
39
generator_opts = {
33
40
command = " prettier" ,
34
- args = {" --stdin-filepath" , " $FILENAME" },
35
- to_stdin = true
41
+ args = { " --stdin-filepath" , " $FILENAME" },
42
+ to_stdin = true ,
36
43
},
37
- factory = h .formatter_factory
44
+ factory = h .formatter_factory ,
38
45
})
39
46
40
47
M .prettier_d_slim = h .make_builtin ({
41
48
method = FORMATTING ,
42
49
filetypes = {
43
- " javascript" , " javascriptreact" , " typescript" , " typescriptreact"
50
+ " javascript" ,
51
+ " javascriptreact" ,
52
+ " typescript" ,
53
+ " typescriptreact" ,
44
54
},
45
55
generator_opts = {
46
56
command = " prettier_d_slim" ,
47
- args = {" --stdin" , " --stdin-filepath" , " $FILENAME" },
48
- to_stdin = true
57
+ args = { " --stdin" , " --stdin-filepath" , " $FILENAME" },
58
+ to_stdin = true ,
49
59
},
50
- factory = h .formatter_factory
60
+ factory = h .formatter_factory ,
51
61
})
52
62
53
63
M .eslint_d = h .make_builtin ({
54
64
method = FORMATTING ,
55
65
filetypes = {
56
- " javascript" , " javascriptreact" , " typescript" , " typescriptreact"
66
+ " javascript" ,
67
+ " javascriptreact" ,
68
+ " typescript" ,
69
+ " typescriptreact" ,
57
70
},
58
71
generator_opts = {
59
72
command = " eslint_d" ,
60
- args = {" --fix-to-stdout" , " --stdin" , " --stdin-filename" , " $FILENAME" },
61
- to_stdin = true
73
+ args = { " --fix-to-stdout" , " --stdin" , " --stdin-filename" , " $FILENAME" },
74
+ to_stdin = true ,
62
75
},
63
- factory = h .formatter_factory
76
+ factory = h .formatter_factory ,
64
77
})
65
78
66
79
M .trim_whitespace = h .make_builtin ({
67
80
method = FORMATTING ,
68
81
generator_opts = {
69
82
command = " awk" ,
70
- args = {" { sub(/[ \t ]+$/, \"\ " ); print }" },
71
- to_stdin = true
83
+ args = { ' { sub(/[ \t ]+$/, " "); print }' },
84
+ to_stdin = true ,
72
85
},
73
- factory = h .formatter_factory
86
+ factory = h .formatter_factory ,
74
87
})
75
88
76
89
return M
0 commit comments