-
-
Notifications
You must be signed in to change notification settings - Fork 39
The server shuts down when I close the editor #486
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
Comments
This is expected |
Are you using the TCP adapter for a special reason? |
Oh, I see, sorry for not checking the documentation first. My mistake.
Two reasons:
|
How long are these delays? The TCP mode is not meant to be used by multiple editors or editing sessions, it's mostly meant to for easy testing during development of Next LS. Regarding that Elixir Forum post, I noticed that your downloaded the linux arm binary. Is that correct? What is your host OS? |
Around 15-20 seconds. Not a huge problem, but it would be nice if I could eliminate it. I have a short screencast that demonstrates this behaviour.
go-to-definition-delay-lt-10mb.movSorry for the awful video quality, GitHub limited me to 10mb, so I exported it is as 480p. I still have the original, and can upload it to Youtube if it helps.
Clear. I was experimenting with something that was not meant for regular usage 😅
It should be the correct one, I think. I'm running inside of an UTM based virtual machine on a Mac Studio 2. $ uname -a
Linux dev 5.15.0-102-generic #112-Ubuntu SMP Tue Mar 5 16:49:56 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux Thank you for taking time to look into this. I fully understand that I'm doing something a bit exotic, which does not fall into the regular, everyday, usage of next-ls. |
so, definitions shouldn't work inside of test files (its a current limitation of test files), so i am surprised to see that jump work at all. From what I saw, the server booted up pretty quickly, the Also, based on looking at your config, are you using Elixir LS and Next LS? that might explain why it was able to jump at all (I can't remember how Elixir LS works inside test files). Can you try your test again but opening a normal file inside lib? |
Ignore that other issue i opened 😅 |
Heh, interesting, I also didn't know that go-to-definition should not work in test files. Here are some further experiments:
go-to-def-lib.mov
The good news is that the original performance problem is non-existent as I was basing my judgment mostly on test files. One thing that still puzzles me is how does the jump still working even after I've removed the elixir_ls config. 🤔 Edit: Just to be sure that it is not elixir-ls, I've also commented out this line https://github.com/shiroyasha/neovimfiles/blob/master/lua/shiroyasha/plugins/lsp/elixir.lua#L2 |
I dig a bit deeper, and looked into the database. Given that there is no mention of the test directory, or the support module in the nextls.db, it must mean that I'm still using ElixirLS for that jump after all. Out of curiosity, what is the root problem that prevents nextls from collecting references in the test directory? |
Elixir LS is enabled by default, so you have to disable it for it to turn off.
Tests are scripts and are not compiled. The way Next LS builds its index is via compiler tracers. Also, some test code (often in test/support) is only compiled in the test environment, but we compile your project in the dev environment. |
Thank you for your detailed responses regarding the language server behavior. I would really like to have the goto definition functionality inside of tests, if it is possible in any way. Would you be open to continuing this conversation in a dedicated github discussion? I would be happy to contribute or prototype some ideas to explore this further. Of course, if it is not a planned feature, I understand that as well. |
Sounds great! Thank you for investing time & energy into this 🙇♂️ |
I'm starting a standalone language server with:
and connect to it via Neovim.
Everything works as expected. However, as I close the editor, the server shuts down.
Let me know if I can help in any other way, e.g. by providing version numbers, operating system, etc..
The text was updated successfully, but these errors were encountered: