From 05ca8a332cb1e536a3ecf2d4847dba33de3572d1 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Wed, 20 Jul 2022 18:47:11 +0200 Subject: [PATCH] chore(nvim): disable LSP tsserver --- nvim/lua/kogakure/lsp/configs.lua | 66 +++++++++++++++---------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/nvim/lua/kogakure/lsp/configs.lua b/nvim/lua/kogakure/lsp/configs.lua index dcad94c..9d5c58b 100644 --- a/nvim/lua/kogakure/lsp/configs.lua +++ b/nvim/lua/kogakure/lsp/configs.lua @@ -1,49 +1,45 @@ -local status_ok, lsp_installer = pcall(require, 'nvim-lsp-installer') +local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer") if not status_ok then - return + return end -local lspconfig = require('lspconfig') +local lspconfig = require("lspconfig") local servers = { - 'cssls', - 'diagnosticls', - 'emmet_ls', - 'pyright', - 'sumneko_lua', - 'tsserver', + "cssls", + "diagnosticls", + "emmet_ls", + "pyright", + "sumneko_lua", + -- 'tsserver', } -lsp_installer.settings( - { - ui = { - icons = { - server_installed = '✓', - server_pending = '➜', - server_uninstalled = '✗', - }, - }, +lsp_installer.settings({ + ui = { + icons = { + server_installed = "✓", + server_pending = "➜", + server_uninstalled = "✗", + }, + }, - max_concurrent_installers = 4, - } -) + max_concurrent_installers = 4, +}) -lsp_installer.setup( - { - ensure_installed = servers, - } -) +lsp_installer.setup({ + ensure_installed = servers, +}) for _, server in pairs(servers) do - local opts = { - on_attach = require('kogakure.lsp.handlers').on_attach, - capabilities = require('kogakure.lsp.handlers').capabilities, - } + local opts = { + on_attach = require("kogakure.lsp.handlers").on_attach, + capabilities = require("kogakure.lsp.handlers").capabilities, + } - local has_custom_opts, server_custom_opts = pcall(require, 'kogakure.lsp.settings.' .. server) - if has_custom_opts then - opts = vim.tbl_deep_extend('force', opts, server_custom_opts) - end + local has_custom_opts, server_custom_opts = pcall(require, "kogakure.lsp.settings." .. server) + if has_custom_opts then + opts = vim.tbl_deep_extend("force", opts, server_custom_opts) + end - lspconfig[server].setup(opts) + lspconfig[server].setup(opts) end