Treesitter highlighting doesn't work with the new version of treesitter
Description
Neovim version
NVIM v0.11.1
Build type: RelWithDebInfo
LuaJIT 2.1.1741730670
Operating system and version
Linux 6.14.7-arch2-1
Telescope version / branch / rev
telescope 0.1.8
checkhealth telescope
Checking for required plugins ~
- ✅ OK plenary installed.
- ✅ OK nvim-treesitter installed.
Checking external dependencies ~
- ✅ OK rg: found ripgrep 14.1.1
- ✅ OK fd: found fd 10.2.0
===== Installed extensions =====
Steps to reproduce
open neovim
:Telescope find_files
Expected behavior
Telescope should work with treesitter highlighting.
Actual behavior
Treesitter highlighting is broken after the new treesitter version on the main branch
Minimal config
(I don't know how to properly set this up, please excuse me)
-- telescope.lua
return {
'nvim-telescope/telescope.nvim', tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' },
}
--treesitter.lua
return {
'nvim-treesitter/nvim-treesitter',
lazy = false,
branch = 'main',
build = ':TSUpdate',
config = function()
require'nvim-treesitter'.setup {
-- Directory to install parsers and queries to
install_dir = vim.fn.stdpath('data') .. '/site'
}
require'nvim-treesitter'.install{ 'lua', 'html', 'css', 'javascript', 'typescript', 'svelte', 'rust' }
vim.api.nvim_create_autocmd('FileType', {
pattern = { '<filetype>' },
callback = function() vim.treesitter.start() end,
})
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end
}
+1
this is an issue with the 0.1.x branch, if you switch to master it is resolved
I know that it works with master, but considering that master is now locked out of development, it would be a nice idea moving forwards to make telescope work with the main branch, Unfortunately I don't have the know-how that goes into this to be able to help, so all I can do is point it out.
I meant the master branch of telescope
In this case, maybe they could update the documentation to use the master branch
HI, the master branch of telescope doesn't seem to fix the problem for me.
HI, the master branch of telescope doesn't seem to fix the problem for me.
i had the exact same issue and it worked just fine for me
@salfel Ah! Yes my bad, I double checked and as I am using lazy.nvim, telescope was written as a dependency to another plugin and there telescope had it's branch set to 0.1.x (don't know why xd) so my actual telescope config didn't properly use the master branch. Now it works! Thanks.