nyoom.nvim
nyoom.nvim copied to clipboard
Errors after adding lsps
I tried adding custom lsp servers in lsp.fnl (I just added them to the array after installing server itself)
For example in Svelte files I get
Error executing vim.schedule lua callback: ...ache/nvim/hotpot/Users/icy/.config/nvim/fnl/pack/lsp.lua:33: module 'telescope.builtin' not found:
no field package.preload['telescope.builtin']
no file './telescope/builtin.lua'
no file '/usr/local/Cellar/luajit-openresty/2.1-20220411/share/luajit-2.1.0-beta3/telescope/builtin.lua'
no file '/usr/local/share/lua/5.1/telescope/builtin.lua'
no file '/usr/local/share/lua/5.1/telescope/builtin/init.lua'
no file '/usr/local/Cellar/luajit-openresty/2.1-20220411/share/lua/5.1/telescope/builtin.lua'
no file '/usr/local/Cellar/luajit-openresty/2.1-20220411/share/lua/5.1/telescope/builtin/init.lua'
no file '/Users/icy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/telescope/builtin.lua'
no file '/Users/icy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/telescope/builtin/init.lua'
no file '/Users/icy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/telescope/builtin.lua'
no file '/Users/icy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/telescope/builtin/init.lua'
no file './telescope/builtin.so'
no file '/usr/local/lib/lua/5.1/telescope/builtin.so'
no file '/usr/local/Cellar/luajit-openresty/2.1-20220411/lib/lua/5.1/telescope/builtin.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/Users/icy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/telescope/builtin.so'
no file './telescope.so'
no file '/usr/local/lib/lua/5.1/telescope.so'
no file '/usr/local/Cellar/luajit-openresty/2.1-20220411/lib/lua/5.1/telescope.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/Users/icy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/telescope.so'
stack traceback:
[C]: in function 'require'
...ache/nvim/hotpot/Users/icy/.config/nvim/fnl/pack/lsp.lua:33: in function '_on_attach'
...pack/packer/opt/nvim-lspconfig/lua/lspconfig/configs.lua:280: in function '_setup_buffer'
...pack/packer/opt/nvim-lspconfig/lua/lspconfig/configs.lua:183: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Although lsp and cmp works perfectly afterwards
I also get error [lspconfig] Cannot access configuration for rust-analyzer. Ensure this server is listed in `server_configurations.md` or added as a custom server. when editing any .rs file, I have rust-analazyer installed through Mason and brew
Am I missing something?
Happens to me from time to time as well, and I'm not sure why. I reckon it's probably due to the weird way 'rust-tools.nvim' is loading the lsp_server, though I'm not sure how to fix it. I'll take a look again soon
Ok then, I will be waiting
Happens to me from time to time as well, and I'm not sure why. I reckon it's probably due to the weird way 'rust-tools.nvim' is loading the lsp_server, though I'm not sure how to fix it. I'll take a look again soon
This is possibly because the way you lazyload the plugins, sometimes Telescopes is loaded after LSP hence it's module was not found.
My guess is you could try lazyload Telescope with sth like {:event :BufRead}so that Telescope is available after startup.
@babygau rust-tools.nvim and/or lsp shouldn't be dependent on Telescope, I'm not really sure whats happening here.
@babygau rust-tools.nvim and/or lsp shouldn't be dependent on Telescope, I'm not really sure whats happening here.
But this is what I see in your lsp config
https://github.com/shaunsingh/nyoom.nvim/blob/main/fnl/pack/lsp.fnl#L38-L42
Btw, just my guess 😀
Oops, forgot about that piece . Thanks ill move that mapping over to be loaded on telescopes load :)
Fixed in a seperate branch that contains some work I'm doing on modularizing the config a bit more. I'll back port the changes soon https://github.com/shaunsingh/nyoom.nvim/blob/ae23a9884f9d030aa66f667e17f6dd08a20e8b1e/fnl/modules/tools/lsp/config.fnl#L52-L58
Fixed in a seperate branch that contains some work I'm doing on modularizing the config a bit more. I'll back port the changes soon https://github.com/shaunsingh/nyoom.nvim/blob/ae23a9884f9d030aa66f667e17f6dd08a20e8b1e/fnl/modules/tools/lsp/config.fnl#L52-L58
Does it fix Rust-analyzer problem?
I haven't had the rust-analyzer problem in a while so I assume that fixed it as well
Oh, ok, maybe a MacOs problem, I will have test on Arch, huge thanks anyway! Love your work
I think it should be fixed now, on main