Skip to content
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

[Bug] clangd return errors #91

Open
pidgeon777 opened this issue Apr 8, 2023 · 2 comments
Open

[Bug] clangd return errors #91

pidgeon777 opened this issue Apr 8, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@pidgeon777
Copy link

When trying to edit a file stored in a WSL instance, clangd-16 LSP server crashes reporting each time a different message for each buffer edit (reload) command:

[distant] [ERROR 03:34:50] ...packer\\start\\distant.nvim/lua\\distant\\cli\\client\\lsp.lua:151: Client terminated: "NO_RESULT_CALLBACK_FOUND"
[distant] [ERROR 03:34:52] ...packer\\start\\distant.nvim/lua\\distant\\cli\\client\\lsp.lua:151: Client terminated: "READ_ERROR"
[distant] [ERROR 03:34:54] ...packer\\start\\distant.nvim/lua\\distant\\cli\\client\\lsp.lua:151: Client terminated: "NOTIFICATION_HANDLER_ERROR"
[distant] [ERROR 03:34:56] ...packer\\start\\distant.nvim/lua\\distant\\cli\\client\\lsp.lua:151: Client terminated: "SERVER_REQUEST_HANDLER_ERROR"
[distant] [ERROR 03:34:57] ...packer\\start\\distant.nvim/lua\\distant\\cli\\client\\lsp.lua:151: Client terminated: "SERVER_RESULT_CALLBACK_ERROR"
[distant] [ERROR 03:34:59] ...packer\\start\\distant.nvim/lua\\distant\\cli\\client\\lsp.lua:151: Client terminated: "ON_INIT_CALLBACK_ERROR"

Neovim version:

NVIM v0.8.3
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilato da runneradmin@fv-az171-224

distant.nvim setup:

{
  -- Applies Chip's personal settings to every machine you connect to
  --
  -- 1. Ensures that distant servers terminate with no connections
  -- 2. Provides navigation bindings for remote directories
  -- 3. Provides keybinding to jump into a remote file's parent directory
  ['*'] = require('distant.settings').chip_default(),
  ['133.25.214.41'] = {
    distant = {
      bin = '/root/.cargo/bin/distant',
    },
    lsp = {
      ['Project Distant'] = {
        cmd = { 'clangd-16' },
        filetypes = { 'c', 'cpp' },
        root_dir = '/home/root/projects/src',
        on_attach = function()
          vim.keymap.set('n', 'gD', '<CMD>lua vim.lsp.buf.declaration()<CR>')
          vim.keymap.set('n', 'gd', '<CMD>lua vim.lsp.buf.definition()<CR>')
          vim.keymap.set('n', 'gh', '<CMD>lua vim.lsp.buf.hover()<CR>')
          vim.keymap.set('n', 'gi', '<CMD>lua vim.lsp.buf.implementation()<CR>')
          vim.keymap.set('n', 'gr', '<CMD>lua vim.lsp.buf.references()<CR>')
        end,
      },
    },
  },
}

distant.nvim branch: v0.2

distant.exe path: C:\Work\Temp\Neovim\data\nvim-data\distant.nvim\bin\distant.exe

distant.exe version: distant 0.20.0-alpha.4

Os: Windows 10 Pro

@chipsenkbeil chipsenkbeil added the bug Something isn't working label Apr 8, 2023
@chipsenkbeil
Copy link
Owner

Thanks for reporting this! Let me see if I can get a test rig configured to replicate your issue. When I've seen errors like that, it usually meant that I had an old version of neovim that didn't support certain LSP protocol messages of a more modern language server implementation. But this could be something else.

There's also something I need to clean up that could be affecting Windows computers specifically. So stay tuned!

@chipsenkbeil
Copy link
Owner

@pidgeon777 is this still an issue with v0.3 of the plugin? I'll leave this open for a week, and then close if I don't hear anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants