Skip to content

Depend on nvim-treesitter-locals instead of nvim-treesitter:master - #253

Open
neeshy wants to merge 3 commits into
RRethy:masterfrom
neeshy:master
Open

Depend on nvim-treesitter-locals instead of nvim-treesitter:master#253
neeshy wants to merge 3 commits into
RRethy:masterfrom
neeshy:master

Conversation

@neeshy

@neeshy neeshy commented Jan 31, 2026

Copy link
Copy Markdown

This commit allows users to migrate to nvim-treesitter:main. nvim-treesitter-locals is used as a dependency which provides a reimplementation of find_definition and find_usages from nvim-treesitter.locals. Backwards compatibility with nvim-treesitter:master is maintained for users of neovim version 0.8 and below.

Retain backwards compatibility with nvim-treesitter:master otherwise

Fixes RRethy#247
UrsaDK added a commit to UrsaDK/vim-illuminate that referenced this pull request Mar 1, 2026
Merge RRethy#249 and RRethy#253 to resolve
RRethy#247.

Updates vim-illuminate to remain compatible with both the legacy
nvim-treesitter `master` branch and the rewritten `main` branch, whose
APIs and module layout differ substantially – several features that were
previously included are now provided by separate modules.

To ensure the treesitter provider attaches only when the required
capabilities are actually available, the integration is made more
defensive: parser availability, locals queries, and cursor node lookups
are resolved dynamically based on the APIs present at runtime, and
cached for further reuse.

---------

Co-authored-by: neeshy <neeshy@tfwno.gf>
Co-authored-by: dqnk <64268180+dqnk@users.noreply.github.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