Skip to content

LSP Crashes in NeoVim #282

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

Closed
2 tasks done
timwmillard opened this issue Mar 31, 2025 · 1 comment · Fixed by #273
Closed
2 tasks done

LSP Crashes in NeoVim #282

timwmillard opened this issue Mar 31, 2025 · 1 comment · Fixed by #273
Assignees
Labels
bug Something isn't working

Comments

@timwmillard
Copy link

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"
            }

@timwmillard timwmillard added the bug Something isn't working label Mar 31, 2025
@psteinroe
Copy link
Collaborator

thanks for reporting! We are already able to repro this thanks to #271 and are looking to fix it before the next release is out.

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

Successfully merging a pull request may close this issue.

2 participants