Skip to content

Neovim LSP Client Crashing on unhandled tabby/chat feature registration #4486

@datGryphon

Description

@datGryphon

Describe the bug
Neovim 0.12.0+ has been failing with recent versions of tabby-agent.

     Error  08:16:00 AM msg_show.echoerr LSP[tabby]: Error SERVER_REQUEST_HANDLER_ERROR: "...wrapped-0.12.1/share/nvim/runtime/lua/vim/lsp/client.lua:969: table index is nil"  

Which caused vim-tabby / autocompletion to stop working.

Information about your version
Please provide output of tabby --version

Information about your GPU
This is an issue inside the tabby-agent TS LSP server code, not the core rust application. I was seeing the issue with the latest 1.8.0 npx tabby-agent package.

The issue looks to be related to the ChatFeature functionality which is specific to VSCode clients.

There could be an argument made that some of this responsibility falls on neovim to not crash for an unknown handler? I'm not well versed on the politics.

Additional context
I have a local branch with a solution. It involves exposing clientInfo from the tabbyApiClient and an extracted getClientType utility from telemetry.ts. Then inside ChatFeature, only send connection.client.register(ChatFeatures.type) when the client type is "vscode". I am working my way through the contribution guidelines.

Edit: Forgot to call out the corresponding issue someone else opened in vim-tabby.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions