|
@@ -13,7 +13,7 @@ local flake8 = {
|
|
local isort = {formatCommand = "isort --quiet -", formatStdin = true}
|
|
local isort = {formatCommand = "isort --quiet -", formatStdin = true}
|
|
|
|
|
|
local yapf = {formatCommand = "yapf --quiet", formatStdin = true}
|
|
local yapf = {formatCommand = "yapf --quiet", formatStdin = true}
|
|
-local black = {formatCommand = "black --quiet --stdin-filename ", formatStdin = true}
|
|
|
|
|
|
+local black = {formatCommand = "black --quiet -", formatStdin = true}
|
|
|
|
|
|
if O.python.linter == 'flake8' then table.insert(python_arguments, flake8) end
|
|
if O.python.linter == 'flake8' then table.insert(python_arguments, flake8) end
|
|
|
|
|
|
@@ -27,12 +27,22 @@ end
|
|
|
|
|
|
-- lua
|
|
-- lua
|
|
local lua_arguments = {}
|
|
local lua_arguments = {}
|
|
|
|
+
|
|
local luaFormat = {
|
|
local luaFormat = {
|
|
formatCommand = "lua-format -i --no-keep-simple-function-one-line --column-limit=120",
|
|
formatCommand = "lua-format -i --no-keep-simple-function-one-line --column-limit=120",
|
|
formatStdin = true
|
|
formatStdin = true
|
|
}
|
|
}
|
|
|
|
|
|
-if O.lua.formatter == 'lua-format' then table.insert(lua_arguments, luaFormat) end
|
|
|
|
|
|
+local lua_fmt = {
|
|
|
|
+ formatCommand = "luafmt --indent-count 2 --line-width 120 --stdin",
|
|
|
|
+ formatStdin = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+if O.lua.formatter == 'lua-format' then
|
|
|
|
+ table.insert(lua_arguments, luaFormat)
|
|
|
|
+elseif O.lua.formatter == 'lua-fmt' then
|
|
|
|
+ table.insert(lua_arguments, lua_fmt)
|
|
|
|
+end
|
|
|
|
|
|
-- sh
|
|
-- sh
|
|
local sh_arguments = {}
|
|
local sh_arguments = {}
|