fix styling issues (#811)

This commit is contained in:
Abouzar Parvan 2021-07-09 16:37:25 +04:30 committed by GitHub
parent a9e7b6ff8c
commit 2866ba528c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 170 additions and 176 deletions

View file

@ -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