nvim-config

Log | Files | Refs | Submodules | README

commit ca2720916e239c88b861826dd8521d7c881ba299
parent 938c937ebdaba8f77873481b8209af2996dab3ad
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Fri,  3 Jun 2022 09:02:39 +0200

fix(lsp): allow having system-installed servers

Diffstat:
Mlua/lsp_config.lua | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -1,5 +1,3 @@ -require("nvim-lsp-installer").setup {} -local lsp_installer_servers = require'nvim-lsp-installer.servers' local lsp = require'lspconfig' vim.cmd[[packadd nvim-lspconfig]] @@ -120,16 +118,25 @@ local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true local default_config = { capabilities = capabilities, on_attach = on_attach } +local system_lsps = { + hls = default_config, +} + +for lname,config in pairs(system_lsps) do + lsp[lname].setup(config) +end + +require("nvim-lsp-installer").setup {} +local lsp_installer_servers = require'nvim-lsp-installer.servers' + local lsps = { -- Default configs clangd = default_config, als = default_config, - ghcide = default_config, pylsp = default_config, ocamllsp = default_config, rnix = default_config, vimls = default_config, - hls = default_config, -- Special cases rust_analyzer = {