Pin nvim-treesitter to fix 'Invalid node type tab' error#67
Merged
michaelbarton merged 5 commits intomasterfrom Feb 25, 2026
Merged
Pin nvim-treesitter to fix 'Invalid node type tab' error#67michaelbarton merged 5 commits intomasterfrom
michaelbarton merged 5 commits intomasterfrom
Conversation
Remove stale vim parser from site directory on startup. A cached tree-sitter-vim parser conflicts with nvim-treesitter managed queries that reference the newer 'tab' node type. See: nvim-treesitter/nvim-treesitter#8369 https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii
The previous fix tried to remove a stale parser file, but the real issue is the vim highlights query referencing a "tab" node type that doesn't exist in the installed tree-sitter-vim parser. This fix reads the query files at startup, strips the "tab" reference, and re-sets the patched query via vim.treesitter.query.set(). See: nvim-treesitter/nvim-treesitter#8369 https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii
The previous runtime patching approach couldn't be verified. Pinning to commit d0bf5ff (Dec 17, before the "tab" node was added to vim/highlights.scm) is a known working fix. See: nvim-treesitter/nvim-treesitter#8369 https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii
Collapse multi-line raise onto single line to satisfy black --line-length=100 check. https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii
The pin approach prevents the issue at the source by using a known working nvim-treesitter version, rather than cleaning up stale parsers at runtime. https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nvim-treesitterto commitd0bf5ff(before the"tab"node type was added toqueries/vim/highlights.scm)"Invalid node type 'tab'"error caused by a mismatch between nvim-treesitter's query and the installed tree-sitter-vim parser"tab"supportTest plan
"Invalid node type 'tab'"error appearsSee: nvim-treesitter/nvim-treesitter#8369
https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii