mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 15:19:26 +02:00
fix(emf-general-ls): fix black, add lua-fmt (#264)
This commit is contained in:
parent
7a29d5204a
commit
82aeecdb10
1 changed files with 12 additions and 2 deletions
|
@ -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 = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue