neovim / tree-sitter-vimdoc

Tree-sitter parser for Vim help files
Apache License 2.0
97 stars 13 forks source link

query.lua:219: query: invalid node type at position 14 for language help #69

Closed AlexSWall closed 1 year ago

AlexSWall commented 1 year ago

No matter which help file I open, be it an empty file or the help file for treesitter, I'm always getting this error on load and repeatedly as I move around the file.

Error detected while processing FileType Autocommands for "*":
Error executing lua callback: ...im/0.8.1/share/nvim/runtime/lua/vim/treesitter/query.lua:219: query: invalid node type at position 14 for language help
stack traceback:
        [C]: in function '_ts_parse_query'
        ...im/0.8.1/share/nvim/runtime/lua/vim/treesitter/query.lua:219: in function 'get_query'
        ...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:52: in function 'new'
        ...r/neovim/0.8.1/share/nvim/runtime/lua/vim/treesitter.lua:45: in function '_create_parser'
        ...r/neovim/0.8.1/share/nvim/runtime/lua/vim/treesitter.lua:96: in function 'get_parser'
        .../start/nvim-treesitter/lua/nvim-treesitter/highlight.lua:34: in function 'start'
        .../start/nvim-treesitter/lua/nvim-treesitter/highlight.lua:42: in function 'attach'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:505: in function 'attach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:528: in function 'reattach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:131: in function <...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:130>

I've removed all of my plugins and configuration and I'm still getting this issue whenever the filetype is help.

clason commented 1 year ago

Not an issue with this repo. Make sure your rtp is set up so both queries and parsers have the same priority.

AlexSWall commented 1 year ago

Ah, apologies, thanks, I'll look into that. I figured it may be for this repo as it only occurs for help files.

I have no idea how you've come to the idea that rtp is involved; would you mind explaining? I've not done anything with it.

AlexSWall commented 1 year ago

In case it helps, my rtp is

/Users/alex/.config/nvim,/opt/homebrew/etc/xdg/nvim,/etc/xdg/nvim,/Users/alex/.local/share/nvim/site,/Users/alex/.local/share/nvim/site/pack/packer/start/packer.nvim,
/Users/alex/.local/share/nvim/site/pack/*/start/*,/opt/homebrew/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/opt/homebrew/Cellar/neovim/0.8.1/share/nvim/runti
me,/opt/homebrew/Cellar/neovim/0.8.1/share/nvim/runtime/pack/dist/opt/matchit,/opt/homebrew/Cellar/neovim/0.8.1/lib/nvim,/usr/share/nvim/site/after,/usr/local/share/nvim/site/aft
er,/opt/homebrew/share/nvim/site/after,/Users/alex/.local/share/nvim/site/after,/etc/xdg/nvim/after,/opt/homebrew/etc/xdg/nvim/after,/Users/alex/.config/nvim/after
AlexSWall commented 1 year ago

Running TSUninstall help alerted me to the fact that the help parser had been installed by the homebrew-installed version of Neovim (v0.8.1). I fixed the problem by uninstalling it and doing a HEAD install of neovim instead (brew install --HEAD neovim).