File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ The current list of defaults by filetype is:
47
47
* json, jsonnet: jsonnetfmt
48
48
* julia: JuliaFormatter
49
49
* kotlin: ktfmt
50
- * lua: luaformatterfiveone
50
+ * lua: luaformatterfiveone, stylua
51
51
* nix: nixpkgs-fmt
52
52
* ocaml: ocamlformat
53
53
* python: autopep8, black, yapf
@@ -236,6 +236,10 @@ Default: 'nixpkgs-fmt' `
236
236
The path to the luaformatterfiveone executable.
237
237
Default: 'luaformatterfiveone' `
238
238
239
+ *codefmt:stylua_executable*
240
+ The path to the stylua executable.
241
+ Default: 'stylua' `
242
+
239
243
*codefmt:cljstyle_executable*
240
244
The path to the cljstyle executable.
241
245
Default: 'cljstyle' `
Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ examples.
17
17
18
18
stylua expects the executable to be installed on your system.
19
19
20
+ :silent file somefile.lua
20
21
% function hello()<CR>
21
22
% print("world")<CR>
22
23
% end
23
24
:FormatCode stylua
24
- ! stylua -i 2> .*
25
+ ! stylua --stdin-filepath *somefile.lua* (glob)
25
26
$ function hello()
26
27
$ print("world")
27
28
$ end
@@ -31,7 +32,7 @@ stylua_executable flag if the default of "buildifier" doesn't work.
31
32
32
33
:Glaive codefmt stylua_executable='mystylua'
33
34
:FormatCode stylua
34
- ! mystylelua -i 2> .*
35
+ ! mystylua .*
35
36
$ function hello()
36
37
$ print("world")
37
38
$ end
@@ -42,12 +43,12 @@ Errors are reported using the quickfix list.
42
43
@clear
43
44
% 13()
44
45
:FormatCode stylua
45
- ! stylua -i 2> (.*)
46
+ ! stylua .* 2> (.*)
46
47
$ 1 (status)
47
48
$ echo >\1 ' (command)
48
49
|stylua:Unable to format stdin:\n
49
50
|[string "isCodeValid"]:1: unexpected symbol near '"'13'"
50
- ~ (1 of 1): unexpected symbol near '13'
51
+ ~ * unexpected symbol near '13' (glob)
51
52
:echomsg line('.') . ',' . col('.')
52
53
~ 1,1
53
54
:echomsg string(map(getqflist(), 'v:val.lnum . "," . v:val.text'))
You can’t perform that action at this time.
0 commit comments