mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-03 09:35:26 +02:00
fix styling issues (#811)
This commit is contained in:
parent
a9e7b6ff8c
commit
2866ba528c
11 changed files with 170 additions and 176 deletions
|
@ -3,35 +3,35 @@
|
|||
local M = {}
|
||||
|
||||
M.setup = function()
|
||||
local tsserver_args = {}
|
||||
local tsserver_args = {}
|
||||
|
||||
local prettier = {
|
||||
formatCommand = "prettier --stdin-filepath ${INPUT}",
|
||||
formatStdin = true
|
||||
local prettier = {
|
||||
formatCommand = "prettier --stdin-filepath ${INPUT}",
|
||||
formatStdin = true,
|
||||
}
|
||||
|
||||
if vim.fn.glob "node_modules/.bin/prettier" ~= "" then
|
||||
prettier = {
|
||||
formatCommand = "./node_modules/.bin/prettier --stdin-filepath ${INPUT}",
|
||||
formatStdin = true,
|
||||
}
|
||||
end
|
||||
|
||||
if vim.fn.glob("node_modules/.bin/prettier") ~= "" then
|
||||
prettier = {
|
||||
formatCommand = "./node_modules/.bin/prettier --stdin-filepath ${INPUT}",
|
||||
formatStdin = true
|
||||
}
|
||||
end
|
||||
|
||||
require"lspconfig".efm.setup {
|
||||
-- init_options = {initializationOptions},
|
||||
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
|
||||
init_options = {documentFormatting = true, codeAction = false},
|
||||
filetypes = {"html", "css", "yaml", "vue", "javascript", "javascriptreact", "typescript", "typescriptreact"},
|
||||
settings = {
|
||||
rootMarkers = {".git/", "package.json"},
|
||||
languages = {
|
||||
html = {prettier},
|
||||
css = {prettier},
|
||||
json = {prettier},
|
||||
yaml = {prettier}
|
||||
}
|
||||
}
|
||||
}
|
||||
require("lspconfig").efm.setup {
|
||||
-- init_options = {initializationOptions},
|
||||
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
||||
init_options = { documentFormatting = true, codeAction = false },
|
||||
filetypes = { "html", "css", "yaml", "vue", "javascript", "javascriptreact", "typescript", "typescriptreact" },
|
||||
settings = {
|
||||
rootMarkers = { ".git/", "package.json" },
|
||||
languages = {
|
||||
html = { prettier },
|
||||
css = { prettier },
|
||||
json = { prettier },
|
||||
yaml = { prettier },
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue