nvim/lua/lsp/efm.lua
2022-04-30 16:55:28 +08:00

21 lines
474 B
Lua

-- 部分补全代码不支持autoformat 需使用efm自动补全
-- https://github.com/mattn/efm-langserver
return {
init_options = { documentFormatting = true },
filetypes = { 'python', 'json' },
settings = {
rootMarkers = { ".git/" },
languages = {
python = {
-- pip install yapf
{ formatCommand = "yapf --quiet", formatStdin = true }
},
json = {
-- yarn global add fixjson
{ formatCommand = "fixjson", formatStdin = true }
}
}
}
}