Skip to content

fix(nvim): align Tree-sitter with Neovim 0.12 - #27

Draft
bupd wants to merge 1 commit into
mainfrom
agent/fix-nvim-treesitter-0.12
Draft

fix(nvim): align Tree-sitter with Neovim 0.12#27
bupd wants to merge 1 commit into
mainfrom
agent/fix-nvim-treesitter-0.12

Conversation

@bupd

@bupd bupd commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • migrate nvim-treesitter from the obsolete master API to the supported main API for Neovim 0.12
  • install and update the configured parser set through the rewritten API, including markdown_inline
  • start highlighting and indentation through Neovim's native Tree-sitter APIs while retaining the 100 KB guard
  • remove the local query-directive compatibility shim that is no longer needed on main
  • update the Lazy lockfile to the current main commit

Root cause

The configuration was running Neovim 0.12 with the old nvim-treesitter implementation. Markdown fenced-code injections then passed multi-node captures through compatibility directives written for the earlier query API, causing repeated attempt to call method 'range' (a nil value) errors from both the Tree-sitter decoration provider and render-markdown.nvim.

Impact

Markdown files with fenced code blocks render normally again without repeated redraw errors. Parser versions will remain aligned with plugin query versions through Lazy's :TSUpdate build hook.

The rewritten plugin requires Tree-sitter CLI 0.26.1 or newer; validation used 0.26.9.

Validation

  • luac -p .config/nvim/lua/plugins/treesitter.lua
  • nvim --headless README.md '+sleep 2' '+messages' '+qa!'
  • git diff --check
  • verified Markdown, Lua, and empty headless startup with no Tree-sitter or render-markdown errors

Signed-off-by: Prasanth Baskar <prasanth@8gears.com>
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.

1 participant