fix js json issues (tsserver confilct?)

This commit is contained in:
Ray Elliott 2021-09-19 14:56:16 +01:00
parent d27b3caa9c
commit d6a71c92d4
1 changed files with 6 additions and 7 deletions

View File

@ -66,7 +66,7 @@ end
require "lspconfig".efm.setup { require "lspconfig".efm.setup {
init_options = {documentFormatting = true}, init_options = {documentFormatting = true},
on_attach = on_attach_efm, on_attach = on_attach_efm,
filetypes = {"javascript", "typescript", "json", "sh", "python", "lua"}, filetypes = {"javascript", "json", "sh", "python", "lua"},
root_dir = function(fname) root_dir = function(fname)
return util.root_pattern("tsconfig.json")(fname) or return util.root_pattern("tsconfig.json")(fname) or
util.root_pattern(".eslintrc.js", ".git")(fname); util.root_pattern(".eslintrc.js", ".git")(fname);
@ -75,7 +75,6 @@ require "lspconfig".efm.setup {
rootMarkers = {".eslintrc.js", ".git/"}, rootMarkers = {".eslintrc.js", ".git/"},
languages = { languages = {
javascript = {eslint}, javascript = {eslint},
typescript = {eslint},
json = {jq, fixjson}, json = {jq, fixjson},
python = {flake8, black}, python = {flake8, black},
sh = {shellcheck}, sh = {shellcheck},
@ -105,7 +104,7 @@ local servers = {
-- npm i -g stylelint-lsp -- npm i -g stylelint-lsp
'stylelint_lsp', 'stylelint_lsp',
-- https://github.com/neovim/nvim-lspconfig/wiki -- https://github.com/neovim/nvim-lspconfig/wiki
'tailwindcss', -- 'tailwindcss',
-- npm install -g typescript typescript-language-server -- npm install -g typescript typescript-language-server
'tsserver', 'tsserver',
-- npm install -g vim-language-server -- npm install -g vim-language-server