-- 部分补全代码不支持autoformat 需使用efm自动补全 -- https://github.com/mattn/efm-langserver return { init_options = { documentFormatting = true }, filetypes = { 'python', 'json', 'css', 'yaml' }, settings = { rootMarkers = { ".git/" }, languages = { python = { -- pip install yapf { formatCommand = "yapf --quiet", formatStdin = true } }, json = { -- yarn global add fixjson { formatCommand = "fixjson", formatStdin = true } }, -- yarn global add yaml-lint yaml = { { formatCommand = "yamllint -f parsable -", formatStdin = true } }, css = { -- yarn global add prettier { formatCommand = "prettier --tab-width=4 ${--single-quote:singleQuote} --parser css", formatStdin = true } -- { formatCommand = "prettier ${--tab-width:tabWidth} ${--single-quote:singleQuote} --parser css", formatStdin = true } } } } }