-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Neovim] Doesn't work after 3.6.8 -- keep loading workspaces #1872
Comments
I wonder there is a bad symlink in your workspace, I will try to check it. |
Thank you so much for investigating. The workspace is just my Neovim config plus all the plugins I installed. If there is a bad symlink, it must belong to some plugin, but generally speaking the plugin author won't put a symlink there. I have no ideas. However, everything worked well in version 3.6.7. |
Please provide your server log, see https://github.com/sumneko/lua-language-server/wiki/FAQ#where-can-i-find-the-log-file |
Sure. Let me see where I can find the log file if I am using Neovim. Thanks. |
Here you go: https://gist.github.com/rockyzhang24/535dc9172380ba832d5c68822e46502b Thank you! |
I found this:
Here is a |
As I said, Before 3.6.8, there was no errors even though the whole waiting time was around a couple of seconds (actually it is not too long for a large workspace). However, after upgrading to 3.6.8 and 3.6.9, the waiting time extends to 4-5 minutes. I reported this issue because it worked totally well before but had issues right after I upgraded it to a new version. Thank you very much. |
Check your How many files in |
Please update the latest version, and provide your new log with |
This is the config for Lua server nvim_lsp.sumneko_lua.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
}
Okay. |
I built it via the latest commit (42bad3f). This time, I have been waiting for 10 min but it is still at "Loading Workspace". Here is the log so far https://gist.github.com/rockyzhang24/b91385253b6cac1e20b4319c5ba71976 Really appreciate your help and patience. |
Could you please try this patch? |
Sure. I cloned and rebuilt it. The issue was still existing. Waited for around 6 min and it was still unfinished. Here is the log https://gist.github.com/rockyzhang24/95a5c1101b83d07a16760b559da3b433 Thanks. |
Will go to sleep and be back as soon as I get up. If you need a log generated by version 3.6.7 for a comparison, just let me know and I will install it and send you later. |
Thank you for your helping! |
Please try the latest master |
Wow, it gets improved a lot. It just took around 15 seconds. I think it is kinda acceptable for a large directory, but I am not sure whether it still has room for improvement. I attached the newly-generated log below for your reference. https://gist.github.com/rockyzhang24/5601f95da698edaf28b6b4c8d2181a5a Thank you so much. |
Yes, we are still disccusing this. |
Great! In the previous version 3.6.7, the period is shorter, like around 8-10 seconds. |
Please try this patch |
I did it but it still took around 17 seconds to finish. I attached the log below https://gist.github.com/rockyzhang24/9f6bfadaa70cb4d4dedbebdb3e7e4e24 Thanks a lot. |
Please try this commit. |
That's AMAZING! It just took 5-6 seconds. I also attached the log below for you to see whether you think it still has room to improve. https://gist.github.com/rockyzhang24/87056f42c64fd6267447042739b6c03a Btw, based on the results returned from LSP progress, I noticed "Loading Workspace" and "Diagnosing Workspace" are two separate steps. Is it normal? Please check the demo below. Screen.Recording.2023-02-06.at.09.41.10.movThank you very much. |
Yes. Diagnosing Workspace is just diagnostic feature, you can disable it. |
Okay I see. So, now the start-up time (around 5-6 seconds), in your opinion, is good enough for a large folder, right? |
Really appreciate your patience and efforts 👍 |
I also thank you very much for keep helping me test! |
How are you using the lua-language-server?
NeoVim
Which OS are you using?
MacOS
What is the issue affecting?
Other
Expected Behaviour
It should work normally.
Actual Behaviour
The server doesn't work.
Reproduction steps
This issue occurred after I upgraded this lua-language-server to 3.6.8.
Config the server as Neovim instructs here: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#sumneko_lua
I opened any Lua file, the lsp progress showed "loading workspace" and it lasted forever. Then I quitted Neovim but lua-language-server process is stilling running in the background. Next, I tried to remove
workspace = {}
in the config above and the issue was gone.Another issue is: if I placed a
.luarc.jsonc
file (even if it is empty) under by Neovim config directory,~/.config/nvim/.luarc.json
, and then I opened a Lua file under this directory,~/.config/nvim/lua/test.lua
, the LSP server doesn't work neither. However, it works well in version 3.6.7.By further investigation and testing, I found that this issue happens if the directory is large (the
nvim
directory has many subdirectories because I have plugins installed innvim/pack/start/
). In version 3.6.7, it may took a little time (a couple of seconds) for the Lua server to be ready to work, however, in version 3.6.8 and 3.6.9, it kept loading the workspace and it is still there after two minutes.Update:
this time I opened a Lua file and then hung in there. It took about 5 minutes for the LSP server to initialize. Within this period, no auto-complete, no diagnostics, and after the initialization, everything works fine.
Thank you very much.
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: