Skip to content

Pin nvim-treesitter to fix 'Invalid node type tab' error#67

Merged
michaelbarton merged 5 commits intomasterfrom
claude/fix-nvim-tab-error-GLR5g
Feb 25, 2026
Merged

Pin nvim-treesitter to fix 'Invalid node type tab' error#67
michaelbarton merged 5 commits intomasterfrom
claude/fix-nvim-tab-error-GLR5g

Conversation

@michaelbarton
Copy link
Owner

Summary

  • Pins nvim-treesitter to commit d0bf5ff (before the "tab" node type was added to queries/vim/highlights.scm)
  • Fixes the "Invalid node type 'tab'" error caused by a mismatch between nvim-treesitter's query and the installed tree-sitter-vim parser
  • Includes a TODO to remove the pin once the upstream tree-sitter-vim parser ships with "tab" support

Test plan

  • Open nvim and confirm no "Invalid node type 'tab'" error appears
  • Verify treesitter highlighting still works for vim files

See: nvim-treesitter/nvim-treesitter#8369

https://claude.ai/code/session_01SjsUhg3Q9k8a3nmnDUoMii

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
@michaelbarton michaelbarton merged commit 431b228 into master Feb 25, 2026
1 check passed
@michaelbarton michaelbarton deleted the claude/fix-nvim-tab-error-GLR5g branch February 25, 2026 03:54
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.

2 participants