summaryrefslogtreecommitdiff
path: root/lua/lsp/ts-fmt-lint.lua
diff options
context:
space:
mode:
authorAbouzar Parvan <[email protected]>2021-07-09 16:37:25 +0430
committerGitHub <[email protected]>2021-07-09 08:07:25 -0400
commit2866ba528c7b49c7c7261a327750a7b8fcff345d (patch)
tree2d55fc73758d78a0c733b48930ed73aa3b245c9b /lua/lsp/ts-fmt-lint.lua
parenta9e7b6ff8c60e70df22189d7f1ad17f893e1a727 (diff)
fix styling issues (#811)
Diffstat (limited to 'lua/lsp/ts-fmt-lint.lua')
-rw-r--r--lua/lsp/ts-fmt-lint.lua52
1 files changed, 26 insertions, 26 deletions
diff --git a/lua/lsp/ts-fmt-lint.lua b/lua/lsp/ts-fmt-lint.lua
index 36d4ca8a..8a6c366c 100644
--- a/lua/lsp/ts-fmt-lint.lua
+++ b/lua/lsp/ts-fmt-lint.lua
@@ -3,35 +3,35 @@
local M = {}
M.setup = function()
- local tsserver_args = {}
+ local tsserver_args = {}
- 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
+ local prettier = {
+ formatCommand = "prettier --stdin-filepath ${INPUT}",
+ formatStdin = true,
+ }
- 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}
- }
- }
+ 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 },
+ },
+ },
+ }
end
return M