While trying to open a source file with a file type matching the one set in my config, I get the following stack trace:
E5108: Error executing lua: C:/Program Files/Neovim/share/nvim/runtime/lua/vim/lsp.lua:598: client_id: expected number, got nil
stack traceback:
[C]: in function 'error'
vim/shared.lua:936: in function 'validate'
C:/Program Files/Neovim/share/nvim/runtime/lua/vim/lsp.lua:598: in function 'buf_attach_client'
.../nvim-data/lazy/distant.nvim/lua/distant-core/client.lua:223: in function 'do_connect_client'
.../nvim-data/lazy/distant.nvim/lua/distant-core/client.lua:235: in function 'connect_lsp_clients'
...zy/distant.nvim/lua/distant/editor/open/configurator.lua:177: in function 'configure'
.../nvim-data/lazy/distant.nvim/lua/distant/editor/open.lua:246: in function 'open'
.../nvim-data/lazy/distant.nvim/lua/distant/nav/actions.lua:47: in function <.../nvim-data/lazy/distant.nvim/lua/distant/nav/actions.lua:41>
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 the do_connect_client call, and the data within seemed OK.
I also found out that the cmd field was set to the following:
"distant.exe spawn --lsp distant://1658010143 --connection 1658010143 -- /usr/bin/clangd"
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 a Linux machine, but nothing seems to work.
Concerning my current setup on windows, here is some additional info:
PS C:\Users\robecons\AppData\Local\nvim-data\lazy\distant.nvim> nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Lazy output:
dir C:/Users/robecons/AppData/Local/nvim-data/lazy/distant.nvim
url https://github.com/chipsenkbeil/distant.nvim
branch v0.3
commit 823267c
I'm also using a configuration based on nvchad, and I disabled nvim-lspconfig, as some people pointed out that it causes some issues when paired with distant.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 😄)
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
configtable in../distant-core/client.luabefore thedo_connect_clientcall, and the data within seemed OK.I also found out that the
cmdfield 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
clangdprocess, 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
sshscheme, or running neovim from aLinuxmachine, 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 😄)