With the 'main' branch of nvim-treesitter, what's the easiest way to enable syntax highlighting only for the parsers I have installed, and use default Neovim highlighting for everything else?

Need Help

I switched my config to the main branch of nvim-treesitter. I have installed it for a bunch of languages and enabled it for all filetypes like this:

vim.api.nvim_create_autocmd('FileType', {
  callback = function()
    vim.treesitter.start()
  end,
})

The problem is that I use some languages that are not supported by nvim-treesitter, and when I open a file of that type it doesn't have any syntax highlighting. Neovim has syntax highlighting for those languages, so I would like to use that instead.

I could add pattern = { 'lots', 'of', 'filetypes', 'here' } for all the filetypes that I installed, but I would like to know if there is another way.

Posted Apr 5, 2026, 3:00 AM UTC

1712
Loading comments…