add json format
This commit is contained in:
parent
2e183e81e3
commit
4a1ad02483
@ -1,14 +1,19 @@
|
|||||||
-- 部分补全代码不支持autoformat 需使用efm自动补全
|
-- 部分补全代码不支持autoformat 需使用efm自动补全
|
||||||
-- https://github.com/mattn/efm-langserver
|
-- https://github.com/mattn/efm-langserver
|
||||||
return {
|
return {
|
||||||
init_options = {documentFormatting = true},
|
init_options = { documentFormatting = true },
|
||||||
filetypes = {'python'},
|
filetypes = { 'python', 'json' },
|
||||||
settings = {
|
settings = {
|
||||||
rootMarkers = {".git/"},
|
rootMarkers = { ".git/" },
|
||||||
languages = {
|
languages = {
|
||||||
python = {
|
python = {
|
||||||
-- pip install yapf
|
-- pip install yapf
|
||||||
{formatCommand = "yapf --quiet", formatStdin = true}
|
{ formatCommand = "yapf --quiet", formatStdin = true }
|
||||||
|
},
|
||||||
|
json = {
|
||||||
|
-- yarn global add fixjson
|
||||||
|
{ formatCommand = "fixjson", formatStdin = true }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user