T
Termux5mo ago
szejmon

Cant get lsp to work inside LazyVim

I am using the LazyVim preconfigured nvim starter and cant get lsp to work here is the error: Failed to run config for nvim-lspconfig ...share/nvim/lazy/LazyVim/lua/lazyvim/plugins/lsp/init.lua:215: module 'mason-lspconfig.mappings.server' not found: no field package.preload['mason-lspconfig.mappings.server'] cache_loader: module 'mason-lspconfig.mappings.server' not found cache_loader_lib: module 'mason-lspconfig.mappings.server' not found no file './mason-lspconfig/mappings/server.lua' no file '/data/data/com.termux/files/usr/share/luajit-2.1/mason-lspconfig/mappings/server.lua' no file '/usr/local/share/lua/5.1/mason-lspconfig/mappings/server.lua' no file '/usr/local/share/lua/5.1/mason-lspconfig/mappings/server/init.lua' no file '/data/data/com.termux/files/usr/share/lua/5.1/mason-lspconfig/mappings/server.lua' no file '/data/data/com.termux/files/usr/share/lua/5.1/mason-lspconfig/mappings/server/init.lua' no file './mason-lspconfig/mappings/server.so' no file '/usr/local/lib/lua/5.1/mason-lspconfig/mappings/server.so' no file '/data/data/com.termux/files/usr/lib/lua/5.1/mason-lspconfig/mappings/server.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './mason-lspconfig.so' no file '/usr/local/lib/lua/5.1/mason-lspconfig.so' no file '/data/data/com.termux/files/usr/lib/lua/5.1/mason-lspconfig.so' no file '/usr/local/lib/lua/5.1/loadall.so' stacktrace: - /LazyVim/lua/lazyvim/plugins/lsp/init.lua:215 in config - vim/_editor.lua:447 in cmd - /persistence.nvim/lua/persistence/init.lua:88 in load - lua:1 - vim/_editor.lua:447 in cmd - /snacks.nvim/lua/snacks/picker/actions.lua:564 in fn - /snacks.nvim/lua/snacks/win.lua:339
Solution:
i use this one: cat mason-workaround.lua ```lua return { { "mason-org/mason.nvim", version = "^1.0.0" },...
Jump to solution
6 Replies
Exelroad
Exelroad5mo ago
this is ongoing issue with lazyvim and mason https://github.com/LazyVim/LazyVim/issues/6039
GitHub
bug: Failed to run config for nvim-lspconfig after mason upgrade ...
Did you check docs and existing issues? I have read all the LazyVim docs I have updated the plugin to the latest version before submitting this issue I have searched the existing issues of LazyVim ...
szejmon
szejmonOP5mo ago
sooo is there an actual fix? I saw this thread before but Im not really sure where I should put the code in I didnt see the load more button
Exelroad
Exelroad5mo ago
you see the workaround mentioned there right? you put that in ~/.config/nvim/plugin/
szejmon
szejmonOP5mo ago
sorry Im blind which one? there is a few
Solution
Exelroad
Exelroad5mo ago
i use this one: cat mason-workaround.lua
return {
{ "mason-org/mason.nvim", version = "^1.0.0" },
{ "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
}
return {
{ "mason-org/mason.nvim", version = "^1.0.0" },
{ "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
}
szejmon
szejmonOP5mo ago
aight :3 thanks that worked yay :3

Did you find this page helpful?