efm autoformatting big improvement

This commit is contained in:
Henrik Bakken
2021-12-13 12:20:40 +01:00
parent c2b66111fd
commit c8351d13ca
+4 -7
View File
@@ -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
} }
} }