Treesitter nvim

Getting strange errors when setting up treesitter for nvim, TSUpdate show that all parsers are up to date, have set some to be automaticly installed, and it does install, however it is not there. and if I try to start nvim again, it gives error:

nvim-treesitter[nix]: Error during tarball extraction.
tar (child): tree-sitter-nix.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now


checkhealth returns all ok.
my tree-sitter configuration

https://nixos.wiki/wiki/Tree_sitters

Did you look at my config?
I can do a TSInstall c, however nothing works, it installs, it says but there is no highlight nor when I do, TSInstallInfo it show nothing installed

Why are you making your own module for this? Just install the plugins as described in the wiki so that they will be installed with Nix itself rather than relying on nvim to resolve them. That was the point of linking the wiki.

The prebuilt grammars neovim tries to install are not nix-aware and so are likely not linked correctly to work out of the box.

It make more sense after you explaining it then first the link, thank you.

After some time trying different things, included using the:

(vimPlugins.nvim-treesitter.withPlugins (plugins: tree-sitter.allGrammars))

Still no highlights, when I do run TSInstall nix It installs into ~/.local/share/nvim

I am lost here, I have also tried removing clang, where I seen one guide mention that, still nothing…

after some more checking, the grammars are installed in nix store, however nvim does not find them. How to link the grammars up to nvim?

Root cause: github authentication (in my case).
Solution: Add github “token based” authentication in .curlrc

in ~/.curlrc:
--data '{"access-token":"ghp_xxyyzz........."}'

then start nvim
tree-sitter will install as expected.

Note: .curlrc changes are global. Remove/restore after nvim is done with installation.