mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-04 10:05:37 +02:00
update for yaml must have prettier globally isntalled
This commit is contained in:
parent
7c869fc4ff
commit
0295b6345d
1 changed files with 5 additions and 2 deletions
|
@ -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},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue