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

invalid node type for language bash #335

Open
rbjorklin opened this issue Dec 20, 2023 · 5 comments
Open

invalid node type for language bash #335

rbjorklin opened this issue Dec 20, 2023 · 5 comments
Labels

Comments

@rbjorklin
Copy link

rbjorklin commented Dec 20, 2023

Explain the issue

Error detected while processing CursorMoved Autocommands for "*"..function 3[3]..4[71]..matchup#delim#get_current[1]..<SNR>73_get_delim_multi[3]..matchup#ts
_engine#get_delim[3]..<SNR>70_forward:
line    1:
E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 600 for language bash
stack traceback:
        [C]: in function '_ts_parse_query'
        /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: in function 'get_query'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:55: in function 'get_query'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:142: in function 'prepare_query'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:339: in function 'iter_group_results'
        ...vim-matchup/lua/treesitter-matchup/third-party/query.lua:351: in function 'collect_group_results'
        ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:46: in function 'fn'
        /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:345: in function 'for_each_tree'
        ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:40: in function 'fn'
        ...im/lazy/nvim-treesitter/lua/nvim-treesitter/ts_utils.lua:380: in function 'get_matches'
        ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:102: in function 'fn'
        ...im/lazy/nvim-treesitter/lua/nvim-treesitter/ts_utils.lua:380: in function 'get_active_nodes'
        ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:221: in function 'get_delim'
        [string "luaeval()"]:1: in main chunk

This seems very similar to #334.

EDIT: Setting disable = { "bash" } makes the error go away.
EDIT2: Nvm, looks like disabling bash only reduced the frequency. Running TSUninstall bash actually makes the problem go away but also disables TreeSitter for bash.
EDIT3: That also didn't help. Reverted to the last known good commit: 6c8909b682803d8c3a054259079f158a73a0e30f

@rbjorklin rbjorklin added the bug label Dec 20, 2023
rbjorklin added a commit to rbjorklin/set-me-up that referenced this issue Dec 20, 2023
@andymass
Copy link
Owner

I can't seem to reproduce this, bash tree-sitter works fine for me using latest plugin and parser

@liangkarl

This comment was marked as outdated.

@kristijanhusak
Copy link

@andymass Today I started getting a similar issue with typescript:

img

@chrisgrieser
Copy link

I got the same issue for javascript/typescript since today.

I could pinpoint the issue to this treesitter commit: nvim-treesitter/nvim-treesitter@6da2051

The commit before works fine, while 6da2051 introduces the error

@binhtran432k
Copy link

Hi @chrisgrieser, there is a patch here (#338). You can apply it locally before the PR is merged.

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

No branches or pull requests

6 participants