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

fix(ecma): function -> function_expression #338

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

amaanq
Copy link
Contributor

@amaanq amaanq commented Jan 31, 2024

amaanq referenced this pull request in nvim-treesitter/nvim-treesitter Feb 1, 2024
@andymass andymass merged commit 7f81ae1 into andymass:master Feb 2, 2024
10 checks passed
@andymass
Copy link
Owner

andymass commented Feb 2, 2024

thank you!

@zer09
Copy link

zer09 commented Feb 10, 2024

sorry but this commit breaks typescript

Error detected while processing InsertLeave Autocommands for "*"..function 7[71]..matchup#delim#get_current[1]..<SNR>51_get_delim_multi[3]..matchup#ts_engine#get_delim[3]..<SNR>53_forward:
line    1:
E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 228 for language typescript
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

@srsudar
Copy link

srsudar commented Mar 3, 2024

I had the same problem as @zer09 , but I think it was a treesitter problem. I followed the steps here:

https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#i-get-query-error-invalid-node-type-at-position

Ran :echo nvim_get_runtime_file('parser', v:true), saw that I had the nvim default parser as well, moved it (mv parser parser-old), reinstalled, and it now seems to work...

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

Successfully merging this pull request may close these issues.

4 participants