and each time opening nvim I get this kind of error for plenty grammars
15:49:31 msg_show.echomsg [nvim-treesitter/install/c] error: Error during "tree-sitter build": Could not start dynamically linked executable: tree-sitter
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
I just want to reuse my existing nvim config (using LazyVim.org)
The problem isn’t with tree-sitter itself, but with how NixOS works. nix-ld allows you to specify libraries that should be available for all dynamically-linked software that requires those libraries. Please read the documentation again, enable nix-ld and see if it fixes your problem. If it doesn’t you’ll need to add more libraries to nix-ld which is also shown in the documentation.
But that’s not the nix solution, is it? I suspect lunar vim is pulling its own version of tree-sitter in. So a proper way would be to try to get it to not do that rather than enabling nixld.
The Nix way would be to declare the Neovim configuration either system-wide, or with home-manager. Both of these require more tinkering, debugging, and figuring out how to properly declare a working Neovim config that matches the one that’s already there.