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
LSP: Allow configuration to control processId #14504
Comments
I'd recommend running the container with |
Thank you for the suggestion, while this might have worked for a regular linux distro running docker(I can try this too if you'd like, I have pop_os on my laptop), this does not work for WSL2 since Docker Desktop runs docker as a separate distro in WSL2, which gives it it's own pid namespace. Edit: this is after testing on a Windows desktop running WSL2, forgot to mention that. |
I'd also like to point out that setting processId to |
Right, my suggestion was to enable the client process check, but just share the host process namespace with the container which should work on linux. For your use case, you can use neovim/runtime/lua/vim/lsp.lua Lines 822 to 825 in 9149fe4
|
Works perfect, thank you very much for your help! 😊 |
This issue has been mentioned on Neovim Discourse. There might be relevant details there: https://neovim.discourse.group/t/please-help-trying-to-use-dockerls-as-a-podman-container/1265/1 |
This issue has been mentioned on Neovim Discourse. There might be relevant details there: |
When running LSPs in a container that were made with vscode-languageserver-node, the processId is passed to the server and is periodically checked. If the PID passed to the language server no longer exists, the language server kills itself. This causes the language server to exit 3 seconds after neovim initializes the connection due to neovim's process not existing in the container.
The fix for this is to pass processId as
null
to the language server. This turns off checks that the client process is still running.This is the current work around in neovim
This will then pass nil to processId when it reaches the
initialize_params
here (uv
beingvim.loop
)neovim/runtime/lua/vim/lsp.lua
Lines 777 to 821 in 8a93d10
This seems like a rather dangerous workaround depending on how
getpid
is used in other parts of neovim.I would rather be able to set the
processId
initialization_param
like I would capabilities or rootUri.The text was updated successfully, but these errors were encountered: