add json format

This commit is contained in:
veypi 2022-04-30 16:55:28 +08:00
parent 2e183e81e3
commit 4a1ad02483

View File

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