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

Query error at 20:6. Invalid node type "res_redirect": #223

Closed
vyskocilm opened this issue Sep 9, 2024 · 3 comments · Fixed by #224
Closed

Query error at 20:6. Invalid node type "res_redirect": #223

vyskocilm opened this issue Sep 9, 2024 · 3 comments · Fixed by #224
Labels
question Further information is requested

Comments

@vyskocilm
Copy link
Contributor

After 2cdc64d I get this error when starting neovim. cc @treywood

Failed to run `config` for kulala.nvim

/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 20:6. Invalid node type "res_redirect":
    (res_redirect
     ^

# stacktrace:                                                                                                                                         
  - /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:252 _in_ **fn**
  - /usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58 _in_ **parse**
  - lua/kulala/parser/treesitter.lua:15
  - lua/kulala/parser/init.lua:11
  - lua/kulala/ui/init.lua:6
  - lua/kulala/init.lua:1
  - ~/.config/nvim/lua/plugins/kulala.lua:9 _in_ **config**
  - /usr/share/nvim/runtime/filetype.lua:36
  - /usr/share/nvim/runtime/filetype.lua:35

I tried fixing it via reinstalling TS syntax for http, but it haven't helped and :TSUpdate says all parsers are up to date.

Installation ~
- OK `tree-sitter` found 0.22.6 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v22.3.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: cc (SUSE Linux) 14.2.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

Parser/Features         H L F I J
  - http                ✓ . . . ✓

Removing lines with (res_redirect fixed the problem for me. Because http.so does not have a symbol res_redirect this probably require a modified version of a HTTP treesitter plugin.

> strings ~/.local/share/nvim/lazy/nvim-treesitter/parser/http.so  | grep res_redirect
@gorillamoe
Copy link
Member

Weird, doesn't happen to me, do you have treesitter enabled for Kulala via treesitter= true option?

@treywood
Copy link
Contributor

treywood commented Sep 9, 2024

this was added to the http tree-sitter parser last week (rest-nvim/tree-sitter-http#40), you should make sure that your parsers are up to date with :TSUpdate. I'll also work on a change to make these queries lazily parsed so that this doesn't affect people who haven't turned on tree-sitter parsing

@gorillamoe gorillamoe added the question Further information is requested label Sep 9, 2024
@vyskocilm
Copy link
Contributor Author

you should make sure that your parsers are up to date with :TSUpdate

:Lazy update nvim-treesitter was needed too. Thanks for a help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants