You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problems using lspsaga peek definitions as it loads the peeked item in a floating window and then loads the lsp for that floating window... it seems to conflict with whatever changes were made in this PR as lua language server then reloads the lua workspace files specific to just that floating window (I think basically just loads the few files related to whatever I am peeking)... so then what happens is when I close the floating window my original file seems to have reference to just those limited lua workspace loaded files and all the sudden I get a bunch of diagnostics for missing references for vim.xxx global definitions. To fix this I have to run a LspRestart on that buffer.
See below my .neoconf.json (main thing to notice is I have disabled importing of all plugins and only have a few imported with my lua workspace.
Add a line to one of your lazy plugin imports for setting a keymap like: vim.keymap.set("n", "<leader>TEST", "TEST", { desc = "TEST" })
Restart neovim
Use LspSaga to do a peek definition on the keymap keyword from step 2 using :Lspsaga peek_definition
Notice in my final screenshot below I (1) peek def keymap (2) loads def from neodev types nightly (3) the diagnostic of undefined globals now pops up in my original buffer
The lua lsp workspace loader should not be duplicated, which is now working as expected... but now when I peek into other buffers, the lua workspace indexing seems to lose references most notably it seems to the core vim api stuff?
Repro
No response
The text was updated successfully, but these errors were encountered:
I meet this issue..
the situation is ..
everything is ok at first time I open the file.
and after I do some operations , the lua_ls is reload double for this buffer.
and everything has gone.. lsp is no effective ..
I meet this issue.. 我遇到这个问题.. the situation is .. everything is ok at first time I open the file. and after I do some operations , the lua_ls is reload double for this buffer. and everything has gone.. lsp is no effective ..一切都消失了.. lsp 无效..
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0-dev-2135+g98a4ed0a1
Operating system/version
Windows 11
Describe the bug
Related references / discussion:
As mentioned here (c6be05a#r137665412)
As further context, @liskin workaround posted here (LuaLS/lua-language-server#1596 (comment)) does work as expected and does not have this issue.
Steps To Reproduce
.neoconf.json
(main thing to notice is I have disabled importing of all plugins and only have a few imported with my lua workspace.vim.keymap.set("n", "<leader>TEST", "TEST", { desc = "TEST" })
keymap
keyword from step 2 using:Lspsaga peek_definition
.neoconf.json
Expected Behavior
The lua lsp workspace loader should not be duplicated, which is now working as expected... but now when I peek into other buffers, the lua workspace indexing seems to lose references most notably it seems to the core vim api stuff?
Repro
No response
The text was updated successfully, but these errors were encountered: