Replace nvim-treesitter with Neovim 0.12 native Tree-sitter support#5
Merged
vmarlier merged 2 commits intoMay 11, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/vmarlier/dotfiles/sessions/fcf42dda-2f69-4b0d-a878-02f291a21022 Co-authored-by: vmarlier <32210943+vmarlier@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove nvim-treesitter and integrate Neovim native Tree-sitter
Replace nvim-treesitter with Neovim 0.12 native Tree-sitter support
May 11, 2026
Copilot stopped work on behalf of
vmarlier due to an error
May 11, 2026 11:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nvim-treesitteris archived and was causing config breakage. Neovim 0.12 ships Tree-sitter natively, making the plugin redundant.Changes
nvim/lua/plugins/core.lua— removed the entirenvim-treesitterplugin blocknvim/lua/config/treesitter.lua(new) — native Tree-sitter setup:vim.treesitter.language.install()(fires onVimEnter, non-blocking)FileTypeautocmd usingvim.treesitter.start(); silently falls back to regex when no parser is available<C-space>expand,<bs>shrink) usingvim.treesitter.incremental_selectionnvim/lua/config/index.lua— loads the newconfig.treesittermoduleREADME.md— documents Neovim 0.12+ as minimum requirement; notes automatic parser installationflash.nvim'sflash.treesitter()continues to work unchanged — it calls Neovim's built-in Tree-sitter API directly.Original prompt
Replace the archived nvim-treesitter plugin with Neovim 0.12's native Tree-sitter support. The migration should include:
Current Tree-sitter Setup
nvim/lua/plugins/core.lua(lines 272-346)Required Changes
Remove nvim-treesitter plugin from
nvim/lua/plugins/core.luaCreate native Tree-sitter configuration with auto-installation:
:TSInstallcommands neededMigrate Tree-sitter features:
<C-space>and<bs>)Update dependent plugins:
Update README.md to reflect:
Goals
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: I am currently using nvim-treesitter in my neovim configuration. However, there was some changes lately, the nvim-treesitter plugin has been archived and it messed up my configuration.
I heard that neovim 0.12 is now shipping treesitter as a native feature, I want to adapt my current configuration to replace nvim-treesitter.
Can you describe what I need to do ?
@vmarlier/dotfiles/files/nvim
Assistant: I'll analyze your current nvim configuration to understand how you're using nvim-treesitter and help you migrate to Neovim's native treesitter support.
Assistant: Let me fetch the directory contents to explore your nvim configuration:
Assistant: Based on my analysis of your neovim configuration, here's what you need to do to migrate from
nvim-treesitterto Neovim 0.12's native Tree-sitter support:Migration Strategy
1. Update Your Neovim Version
First, ensure you're on Neovim 0.12 or later. You're currently using 0.11.0 according to your README, so upgrade via ASDF:
asdf install neovim 0.12.0 # or latest asdf global neovim 0.12.02. Remove nvim-treesitter Plugin
In your
nvim/lua/plugins/core.lua(lines 272-346), you need to remove the entire nvim-treesitter plugin block. This plugin becomes unnecessary with native Tree-sitter support.3. Move Tree-sitter Configuration to init.lua
Create a native Tree-sitter configuration. Add this to your
nvim/lua/config/options.luaor create a new config file:4. Update TSInstall Commands
Replace nvim-treesitter's
:TSInstallwith Neovim's built-in approach. Tree-sitter parsers are now managed via:5. Replace Incremental Selection Keymaps
Your current keymaps for incremental selection (lines 286-289) depend on nvim-treesitter. Neovim 0.12+ provides native incremental selection. Update your
nvim/lua/config/mappings.luawith:6. Handle Ensure_installed Languages
Tree-sitter parsers in Neovim 0.12+ need to be pre-installed. You have two options:
Option A: Manual installation
nvim --headless "+TSInstall bash dockerfile go json lua markdown terraform yaml typescript tsx javascript sql dart" +qaOption B: Create an auto-install utility in your config to handle it on startup.
7. Update Dependent Plugins
Check which plugins depend on nvim-treesitter and update them:
nvim-ufo(folding) - may need updates for native Tree-sitterThis pull request was created from Copilot chat.