Skip to content

[deps] nvim-treesitter archived (April 2026) — migrate to native Neovim 0.12 treesitter or pin #151

@stanfish06

Description

@stanfish06

What

nvim-treesitter was archived on April 3, 2026 following the Neovim 0.12 release, which ships treesitter support natively. The plugin will receive no further maintenance, bug fixes, or API-compatibility updates.

Where

  • lua/config/plugins.lua:15 — plugin spec for nvim-treesitter
  • lua/config/treesitter.lua — all parser install/update logic calls into the plugin
  • lua/config/plugin_config.lua:229nvim-treesitter-textobjects depends on it
  • nvim-pack-lock.json — pinned SHA 4916d659

Why it matters

The entire lua/config/treesitter.lua file calls:

  • require("nvim-treesitter") for ts.install() and config helpers
  • require("nvim-treesitter.config").get_install_dir() inside TSSync

As Neovim 0.12 evolves, these call sites will silently fail or return stale data. The TSSync command and the build_latest_parsers() function are currently the only way to update parsers; if the plugin API shifts under them, parser updates break.

Migration options

Option A — go fully native (Neovim 0.12+)

Neovim 0.12 ships treesitter parsers under :h treesitter-parsers. Parser installation is handled by vim.treesitter.language.add() and the built-in :TSInstall (no plugin needed). treesitter.lua can be rewritten to call vim.treesitter directly:

-- install a parser natively (0.12+)
vim.treesitter.language.install("python")

Query files (highlights, indents, folds) are bundled with Neovim 0.12 for supported languages. The custom build_latest_parsers() logic can be retired.

nvim-treesitter-textobjects (main branch, tracked in #101) has already decoupled from nvim-treesitter internals — it should work with native treesitter once queries are present.

Option B — keep the plugin, pin to archived HEAD

Pin nvim-treesitter to its archived HEAD (4916d659) and accept no further updates. This preserves the current setup with no code changes, at the cost of accumulating drift over time.

Recommended action

  1. Confirm the installed Neovim version: :version — if 0.12+, Option A is the forward path.
  2. Audit which nvim-treesitter APIs are called in treesitter.lua and map them to native equivalents.
  3. Check nvim-treesitter-textobjects main branch compatibility (see [deps] nvim-treesitter-textobjects pinned to frozen master branch — migrate to main #101) before removing the plugin.
  4. Keep TSSync / TSBufToggle commands functional during transition by updating the implementation to call vim.treesitter.* directly.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions