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:339Solution:Jump to solution
i use this one:
cat mason-workaround.lua
```lua
return {
{ "mason-org/mason.nvim", version = "^1.0.0" },...6 Replies
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 ...
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
you see the workaround mentioned there right? you put that in
~/.config/nvim/plugin/
sorry Im blind
which one? there is a few
Solution
i use this one:
cat mason-workaround.lua
aight :3
thanks
that worked yay
:3