summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris <[email protected]>2021-03-19 02:37:02 -0400
committerChris <[email protected]>2021-03-19 02:37:02 -0400
commit0295b6345d892b67b075de34923587ebbb9f0f09 (patch)
treede2322f8427c7a8f30e25aee424233a0983b441f
parent7c869fc4ff42a33150fcb5730f371d1e0cb68e51 (diff)
update for yaml must have prettier globally isntalled
-rw-r--r--lua/lsp/efm-general-ls.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/lua/lsp/efm-general-ls.lua b/lua/lsp/efm-general-ls.lua
index f7465396..faac9f4d 100644
--- a/lua/lsp/efm-general-ls.lua
+++ b/lua/lsp/efm-general-ls.lua
@@ -15,6 +15,8 @@ local luaFormat = {
-- JavaScript/React/TypeScript
local prettier = {formatCommand = "./node_modules/.bin/prettier --stdin-filepath ${INPUT}", formatStdin = true}
+local prettier_yaml = {formatCommand = "prettier --stdin-filepath ${INPUT}", formatStdin = true}
+
local eslint = {
lintCommand = "./node_modules/.bin/eslint -f unix --stdin --stdin-filename ${INPUT}",
lintIgnoreExitCode = true,
@@ -39,7 +41,7 @@ local shfmt = {
require"lspconfig".efm.setup {
-- init_options = {initializationOptions},
init_options = {documentFormatting = true, codeAction = false},
- filetypes = {"lua", "python", "javascriptreact", "javascript", "sh", "html", "css", "json"},
+ filetypes = {"lua", "python", "javascriptreact", "javascript", "sh", "html", "css", "json", "yaml"},
settings = {
rootMarkers = {".git/"},
languages = {
@@ -50,7 +52,8 @@ require"lspconfig".efm.setup {
sh = {shellcheck, shfmt},
html = {prettier},
css = {prettier},
- json = {prettier}
+ json = {prettier},
+ yaml = {prettier_yaml},
}
}
}