efm autoformatting big improvement
This commit is contained in:
+4
-7
@@ -788,9 +788,6 @@ require("packer").startup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local prettier = {
|
|
||||||
formatCommand = ([[prettier ${--config-precedence:configPrecedence} ${--tab-width:tabWidth} ${--single-quote:singleQuote} ${--trailing-comma:trailingComma}]])
|
|
||||||
}
|
|
||||||
nvim_lsp.efm.setup {
|
nvim_lsp.efm.setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
init_options = {documentFormatting = true},
|
init_options = {documentFormatting = true},
|
||||||
@@ -820,12 +817,12 @@ require("packer").startup {
|
|||||||
-- }
|
-- }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
javascript = {prettier, eslint},
|
javascript = {{formatCommand = "prettier"}},
|
||||||
yaml = {prettier},
|
yaml = {{formatCommand = "prettier"}},
|
||||||
markdown = {prettier},
|
markdown = {{formatCommand = "prettier"}},
|
||||||
lua = {
|
lua = {
|
||||||
{
|
{
|
||||||
formatCommand = "lua-format -i",
|
formatCommand = "lua-format -i --tab-width=2 --indent-width=2",
|
||||||
formatStdin = true
|
formatStdin = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user