Skip to content

LSP Crashes in NeoVim #282

Closed
Closed
@timwmillard

Description

@timwmillard

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I'm receiving this error in my log file:

[ERROR][2025-03-31 13:38:16] ...p/_transport.lua:36     "rpc"   "/Users/tim/.local/share/nvim/mason/bin/postgrestools"  "stderr"        "Encountered an unexpected error\n\nThis is a bug in Postgres Tools, not an error in your code, and we would appreciate it if you could report it along with the following information to help us fixing the issue:\n\nSource Location: /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tree-sitter-0.20.10/binding_rust/lib.rs:1168:31\nThread Name: tokio-runtime-worker\nMessage: range end index 38 out of range for slice of length 25\n\n"
[ERROR][2025-03-31 13:42:57] ...p/_transport.lua:36     "rpc"   "/Users/tim/.local/share/nvim/mason/bin/postgrestools"  "stderr"        "Encountered an unexpected error\n\nThis is a bug in Postgres Tools, not an error in your code, and we would appreciate it if you could report it along with the following information to help us fixing the issue:\n\nSource Location: /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tree-sitter-0.20.10/binding_rust/lib.rs:1168:31\nThread Name: tokio-runtime-worker\nMessage: range end index 47 out of range for slice of length 46\n\n"

To Reproduce

Using NeoVim, I'm just editing a SQL file in my project and the LSP crashes. Some times the LSP attaches, but then randomly crashes.

Expected behavior

The LSP to not crash when editing sql files.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • NeoVim version 0.11

Additional context

This is my Lua lsp setup.

            lspconfig.postgres_lsp.setup{
                cmd = { "postgrestools", "lsp-proxy" },
                filetypes = { "sql", "psql" },
                single_file_support = true,
                root_dir = lspconfig.util.root_pattern "postgrestools.jsonc"
            }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions