Skip to content

Comments

Fix(subprocess): remove tree-sitter dependency#577

Open
archie-judd wants to merge 2 commits intonvim-neotest:masterfrom
archie-judd:archie/remove-nvim-treesitter-dependency
Open

Fix(subprocess): remove tree-sitter dependency#577
archie-judd wants to merge 2 commits intonvim-neotest:masterfrom
archie-judd:archie/remove-nvim-treesitter-dependency

Conversation

@archie-judd
Copy link

@archie-judd archie-judd commented Jan 20, 2026

Description

Neovim 0.11+ bundles tree sitter parsers in the runtime, and no longer requires nvim-treesitter for basic parsing. This PR updates the subprocess initialisation process to handle both cases.

Changes

  • No longer search for, or add treesitter to the subprocess rtp.
  • Discover parser directories via nvim_get_runtime_file("parser/*", true) and add their parents to rtp.
  • Extract resolve_plugin_root() as a separate function for clarity.
  • Rename add_to_rtp to add_paths_to_rtp with clearer signature
  • Add regression test for parsing in subprocess.

Context

The subprocess needs parsers available for treesitter parsing of test files. Previously this relied on nvim-treesitter being installed. Now it works with:

  • Neovim 0.11+ bundled parsers (no nvim-treesitter required)
  • nvim-treesitter managed parsers (backwards compatibility)
  • Both together

Fixes:

#531

@archie-judd archie-judd force-pushed the archie/remove-nvim-treesitter-dependency branch from 173d0da to 2633fcf Compare January 20, 2026 18:05
@archie-judd archie-judd marked this pull request as ready for review January 20, 2026 18:34
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