I updated to the latest version of nvim-lspconfig. Now when starting neovim I get the following error.
Here's the relevant snippet from my config
local lsp_installer = require("nvim-lsp-installer")
local cmp_lsp = require('cmp_nvim_lsp')
local lsp_installer_servers = require('nvim-lsp-installer.servers')
local requestedLSPServers = {
bashls = {},
}
for lsp, opts in pairs(requestedLSPServers) do
local capabilities = cmp_lsp.default_capabilities(vim.lsp.protocol.make_client_capabilities())
local available, lsp_server = lsp_installer_servers.get_server(lsp)
opts["on_attach"] = on_attach
opts["capabilities"] = capabilities
opts["flags"] = { debounce_text_changes = 150 }
if available and not lsp_server:is_installed() then
lsp_server:install()
end
lsp_server:on_ready(function()
lsp_server:setup(opts)
end)
end
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.9.1/share/nvim"
Run :checkhealth for more info
Nvim-lspconfig version
1cfb96490c3889a2c57d1ef5e1acc59e9b47c455
Operating system and version
macOS 13.4
Affected language servers
all
Steps to reproduce
Apologies but I'm not good enough to create a minimal working config in the amount of time I have. I have added the relevant parts of my config below.
Actual behavior
Error detected while processing /Users/<me>/.config/nvim/init.vim:
line 6:
E5108: Error executing lua ...sh/.vim/plugged/nvim-lspconfig/lua/lspconfig/manager.lua:290: attempt to index local 'self' (a number value)
stack traceback:
...sh/.vim/plugged/nvim-lspconfig/lua/lspconfig/manager.lua:290: in function 'try_add_wrapper'
...ged/nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:91: in function 'attach_buffers'
...ged/nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:80: in function 'setup'
/Users/<me>/.config/nvim/lua/lsp.lua:417: in function 'handler'
...ged/nvim-lsp-installer/lua/nvim-lsp-installer/server.lua:105: in function 'on_ready'
/Users/<me>/.config/nvim/lua/lsp.lua:416: in main chunk
[C]: in function 'require'
[string ":lua"]:1: in main chunk
Expected behavior
No error
Minimal config
This is the relevant snippet from my config. Notice I'm using `nvim-lsp-installer`.
local lsp_installer = require("nvim-lsp-installer")
local cmp_lsp = require('cmp_nvim_lsp')
local lsp_installer_servers = require('nvim-lsp-installer.servers')
local requestedLSPServers = {
bashls = {},
}
for lsp, opts in pairs(requestedLSPServers) do
local capabilities = cmp_lsp.default_capabilities(vim.lsp.protocol.make_client_capabilities())
local available, lsp_server = lsp_installer_servers.get_server(lsp)
opts["on_attach"] = on_attach
opts["capabilities"] = capabilities
opts["flags"] = { debounce_text_changes = 150 }
if available and not lsp_server:is_installed() then
lsp_server:install()
end
lsp_server:on_ready(function()
lsp_server:setup(opts)
end)
end
Description
I updated to the latest version of nvim-lspconfig. Now when starting neovim I get the following error.
Here's the relevant snippet from my config
Neovim version
NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/0.9.1/share/nvim"
Run :checkhealth for more info
Nvim-lspconfig version
1cfb96490c3889a2c57d1ef5e1acc59e9b47c455
Operating system and version
macOS 13.4
Affected language servers
all
Steps to reproduce
Apologies but I'm not good enough to create a minimal working config in the amount of time I have. I have added the relevant parts of my config below.
Actual behavior
Expected behavior
No error
Minimal config