nvim-config

Log | Files | Refs | Submodules | README

commit 938c937ebdaba8f77873481b8209af2996dab3ad
parent d41b869f5b1897ed2e30eb569f124009ce949bd4
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Wed,  1 Jun 2022 10:16:47 +0200

Update lsp config

Diffstat:
Minit.lua | 1+
Mlua/completree-config.lua | 1+
Mlua/lsp_config.lua | 24++++--------------------
3 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/init.lua b/init.lua @@ -9,6 +9,7 @@ end require "plugins" -- Load all plugins vim.g.python_host_prog = "/bin/python" +vim.g.oak_statusline = 1 if jit.os == "Linux" then vim.g.python3_host_prog = "/bin/python3" diff --git a/lua/completree-config.lua b/lua/completree-config.lua @@ -58,6 +58,7 @@ comp.setup { python = lsp_completion, nix = lsp_completion, tex = lsp_completion, + haskell = lsp_completion, -- For git commit and text only do luasnip NeogitCommitMessage = cdef.luasnip, diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -1,5 +1,6 @@ -local lsp = require'lspconfig' +require("nvim-lsp-installer").setup {} local lsp_installer_servers = require'nvim-lsp-installer.servers' +local lsp = require'lspconfig' vim.cmd[[packadd nvim-lspconfig]] vim.diagnostic.config { @@ -128,6 +129,7 @@ local lsps = { ocamllsp = default_config, rnix = default_config, vimls = default_config, + hls = default_config, -- Special cases rust_analyzer = { @@ -235,23 +237,6 @@ local lsps = { }, }, }, -} - -for lname,config in pairs(lsps) do - local server_available, requested_server = lsp_installer_servers.get_server(lname) - if server_available then - requested_server:on_ready(function () - local opts = {} - requested_server:setup(config) - end) - if not requested_server:is_installed() then - -- Queue the server to be installed - requested_server:install() - end - end -end - -local special = { zk = { on_attach = on_attach, capabilities = capabilities, @@ -263,7 +248,6 @@ local special = { } } - -for lname,config in pairs(special) do +for lname,config in pairs(lsps) do lsp[lname].setup(config) end