diff options
| author | Tim Bedard <[email protected]> | 2021-04-17 17:42:51 -0500 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-17 18:42:51 -0400 | 
| commit | 82aeecdb100c1cf47ac8a028951b4445f54f5d75 (patch) | |
| tree | 8cdad5e2c61a46fdae56290005b827c1d3ace97d /lua/lsp | |
| parent | 7a29d5204a4d8f5ca84f285a486a5e60c5180a64 (diff) | |
fix(emf-general-ls): fix black, add lua-fmt (#264)
Diffstat (limited to 'lua/lsp')
| -rw-r--r-- | lua/lsp/efm-general-ls.lua | 14 | 
1 files changed, 12 insertions, 2 deletions
| diff --git a/lua/lsp/efm-general-ls.lua b/lua/lsp/efm-general-ls.lua index 0a9562e7..16f30375 100644 --- a/lua/lsp/efm-general-ls.lua +++ b/lua/lsp/efm-general-ls.lua @@ -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 = {} | 
