Open RCX777 opened 3 months ago
@RCX777 I haven't tested this on newer versions of neovim beyond 0.8; so, I'm wondering if something changed in the LSP API that has broken the LSP integration. It's been awhile since I tried on Windows - was using a Windows VM to test - so I can't remember if there's anything different than expected from what you shared in terms of the command or other output.
I looked up on neovim 0.10 the current documentation for vim.lsp.start_client
, which is what we invoke to get the client id that appears to be nil. I can't remember what the old signature was, but it appears now that it can return nil
for the id and include an error message if something went wrong. So I'm going to create a branch to explicitly check for this.
Can you try out this branch and see what error you get? https://github.com/chipsenkbeil/distant.nvim/tree/fix/AddCheckForFailingToStartLspClient
@chipsenkbeil thanks for the prompt answer! I'm not very familiar with Lua or the Neovim API in general, so I bet it would've taken me some time.
Looks like they changed the cmd
from a string to a table, probably because they wanted to handle the arguments separately from the program name or something.
Now it works properly and I didn't expected it to be so fast, nice job!
I'm leaving a PR, have fun with it :)))))
While trying to open a source file with a file type matching the one set in my config, I get the following stack trace:
I first tried checking my configuration for anything wrong on my part, and couldn't find anything. After that I tried printing the
config
table in../distant-core/client.lua
before thedo_connect_client
call, and the data within seemed OK. I also found out that thecmd
field was set to the following:All of the arguments seemed fine, so I did the natural thing, and tried to run the same command in the terminal, and got no errors. On a separate terminal, I was checking the server log, and found out that when the command was sent from the terminal, the server correctly spawned a
clangd
process, and the request was visible from the log. When instead trying to open the source file from neovim, only 2 requests were logged: one for the file's metadata, and one for the actual data, but nothing LSP-related.I tried connecting using an
ssh
scheme, or running neovim from aLinux
machine, but nothing seems to work.Concerning my current setup on windows, here is some additional info:
I'm also using a configuration based on
nvchad
, and I disablednvim-lspconfig
, as some people pointed out that it causes some issues when paired withdistant.nvim
.I would really to find out a way to fix this, as the single way to work remote without latency AND with LSP support is running vscode, which I just can't switch back to. (I already fell off the deep end 😄)