Neovim Treesitter Highlighting Not Working

Workaround available Windows, macOS, Linux Updated October 21, 2026

Quick answer

nvim-treesitter's default 'main' branch is an incompatible rewrite: it needs Neovim 0.12+, tree-sitter-cli and a C compiler, and no longer enables highlighting itself. Install parsers with require('nvim-treesitter').install() and call vim.treesitter.start().

Most likely fix: Enable highlighting yourself.

Symptoms

Plain or regex-based highlighting after updating, 'highlight = { enable = true }' having no effect, parser install errors, or Lua errors from nvim-treesitter on startup.

Why it happens

  • Plugin updated to the 'main' branch rewrite, where the old setup table (highlight, ensure_installed) is ignored
  • tree-sitter-cli missing or older than 0.26.1, or no C compiler on PATH
  • Running Neovim 0.11, which 'main' no longer supports
  • Lazy-loading nvim-treesitter (not supported)

How to fix it

Try these in order — the most common fix is first.

  1. 1. Enable highlighting yourself

    1. Add a FileType autocommand in init.lua that calls vim.treesitter.start()
    2. Or put vim.treesitter.start() in ftplugin/<filetype>.lua
  2. 2. Install parsers the new way

    1. Call require('nvim-treesitter').install({ 'lua', 'python', 'rust' })
    2. Run :TSUpdate as the plugin build step (e.g. build = ':TSUpdate' in lazy.nvim)
    3. Don't lazy-load the plugin
  3. 3. Install the requirements

    1. Install tree-sitter-cli 0.26.1+ from your package manager (not npm)
    2. Make sure tar, curl and a C compiler (gcc/clang) are on PATH
    3. Run :checkhealth nvim-treesitter
  4. 4. Staying on Neovim 0.11? Pin master

    1. Set branch = 'master' for nvim-treesitter in your plugin manager
    2. The frozen master branch remains for Nvim 0.11 compatibility

This guide also covers

  • neovim treesitter not working
  • nvim-treesitter main branch
  • treesitter highlight not working neovim
  • nvim-treesitter ensure_installed not working

Still not working?

If Neovim keeps failing, you're not alone. See every Neovim problem users report or the alternatives people switch to.

Other Neovim errors