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:
4747 * json, jsonnet: jsonnetfmt
4848 * julia: JuliaFormatter
4949 * kotlin: ktfmt
50- * lua: luaformatterfiveone
50+ * lua: luaformatterfiveone, stylua
5151 * nix: nixpkgs-fmt
5252 * ocaml: ocamlformat
5353 * python: autopep8, black, yapf
@@ -236,6 +236,10 @@ Default: 'nixpkgs-fmt' `
236236The path to the luaformatterfiveone executable.
237237Default: 'luaformatterfiveone' `
238238
239+ *codefmt:stylua_executable*
240+ The path to the stylua executable.
241+ Default: 'stylua' `
242+
239243 *codefmt:cljstyle_executable*
240244The path to the cljstyle executable.
241245Default: 'cljstyle' `
Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ examples.
1717
1818stylua expects the executable to be installed on your system.
1919
20+ :silent file somefile.lua
2021 % function hello()<CR>
2122 % print("world")<CR>
2223 % end
2324 :FormatCode stylua
24- ! stylua -i 2> .*
25+ ! stylua --stdin-filepath *somefile.lua* (glob)
2526 $ function hello()
2627 $ print("world")
2728 $ end
@@ -31,7 +32,7 @@ stylua_executable flag if the default of "buildifier" doesn't work.
3132
3233 :Glaive codefmt stylua_executable='mystylua'
3334 :FormatCode stylua
34- ! mystylelua -i 2> .*
35+ ! mystylua .*
3536 $ function hello()
3637 $ print("world")
3738 $ end
@@ -42,12 +43,12 @@ Errors are reported using the quickfix list.
4243 @clear
4344 % 13()
4445 :FormatCode stylua
45- ! stylua -i 2> (.*)
46+ ! stylua .* 2> (.*)
4647 $ 1 (status)
4748 $ echo >\1 ' (command)
4849 |stylua:Unable to format stdin:\n
4950 |[string "isCodeValid"]:1: unexpected symbol near '"'13'"
50- ~ (1 of 1): unexpected symbol near '13'
51+ ~ * unexpected symbol near '13' (glob)
5152 :echomsg line('.') . ',' . col('.')
5253 ~ 1,1
5354 :echomsg string(map(getqflist(), 'v:val.lnum . "," . v:val.text'))
You can’t perform that action at this time.
0 commit comments