From 0afedec28847dbc8402f88bd0dd3969b939eed5d Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Thu, 12 May 2022 09:16:48 -0400 Subject: [PATCH] Fix deprecation warning for neovim lsp_installer.on_server_ready() per https://github.com/williamboman/nvim-lsp-installer/discussions/636 --- .../nvim/lua/plugins/config/lspinstall.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chezmoi/private_dot_config/nvim/lua/plugins/config/lspinstall.lua b/chezmoi/private_dot_config/nvim/lua/plugins/config/lspinstall.lua index d72fa19..ae9b136 100644 --- a/chezmoi/private_dot_config/nvim/lua/plugins/config/lspinstall.lua +++ b/chezmoi/private_dot_config/nvim/lua/plugins/config/lspinstall.lua @@ -1,6 +1,8 @@ +require("nvim-lsp-installer").setup({}) local lsp_installer_servers = require'nvim-lsp-installer.servers' local cmp_lsp = require('cmp_nvim_lsp') local null_ls = require("null-ls") +local lspconfig = require("lspconfig") -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer @@ -94,9 +96,7 @@ for lspServer, opts in pairs(lspServers) do if server_available then opts["capabilities"] = cmp_lsp.update_capabilities(vim.lsp.protocol.make_client_capabilities()) opts["on_attach"] = on_attach - requested_server:on_ready(function () - requested_server:setup(opts) - end) + lspconfig[lspServer].setup(opts) if not requested_server:is_installed() then requested_server:install() end