mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-04 18:14:40 +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 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
|
||||
|
||||
|
@ -27,12 +27,22 @@ end
|
|||
|
||||
-- lua
|
||||
local lua_arguments = {}
|
||||
|
||||
local luaFormat = {
|
||||
formatCommand = "lua-format -i --no-keep-simple-function-one-line --column-limit=120",
|
||||
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
|
||||
local sh_arguments = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue