Zulip Chat Archive
Stream: lean4
Topic: neovim
Antoine Chambert-Loir (May 12 2025 at 14:49):
New bizarre stuff with neovim this morning, I'm sorry not to be able to solve such things myself…
Error detected while processing /Users/chambert/src/neovim/acl/init.lua:
E5113: Error while calling lua chunk: /Users/chambert/.config/nvim/lua/lsp-setup.lua:76: attempt to call field 'setup_handlers' (a nil val
ue)
stack traceback:
/Users/chambert/.config/nvim/lua/lsp-setup.lua:76: in main chunk
[C]: in function 'require'
/Users/chambert/src/neovim/acl/init.lua:71: in main chunk
Line 76 of lsp-setup-lua says:
mason_lspconfig.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
capabilities = capabilities,
settings = servers[server_name],
filetypes = (servers[server_name] or {}).filetypes,
}
end,
}
Julian Berman (May 12 2025 at 14:52):
That looks unrelated to lean.nvim (and Lean entirely) -- and looks related to https://github.com/mason-org/mason-lspconfig.nvim/blob/d39a75bbce4b8aad5d627191ea915179c77c100f/CHANGELOG.md?plain=1#L27 it appears mason-lspconfig has removed that function entirely. I don't use mason but let's see if I can help figure out what you need to tweak..
Julian Berman (May 12 2025 at 14:54):
(PS I don't personally mind helping with this sort of thing -- hopefully it puts some credit in my bank account to ask silly math questions at some point in exchange -- but of course if you want to be able to solve these things yourself I'm happy to try to help explain how to read that as well.)
Patrick Massot (May 12 2025 at 15:11):
Antoine, you can remove this call to mason_lspconfig.setup_handlers entirely.
Patrick Massot (May 12 2025 at 15:12):
It is indeed coming from a breaking change in mason.
Patrick Massot (May 12 2025 at 15:12):
Note mason was bumped to whole new version number here, so breaking changes are very much expected.
Patrick Massot (May 12 2025 at 15:13):
But it would be nice if lazy.nvim could ask confirmation before updating to a new major version.
Julian Berman (May 12 2025 at 15:14):
Here is a (partially tested) PR https://github.com/AntoineChambert-Loir/nvim/pull/1
Last updated: Dec 20 2025 at 21:32 UTC