-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nvim treesitter abi incorrect #119
Comments
How are you compiling your tree-sitter parsers? Are they built by nix? I have the following in my HM config:
The version of TS used to compile them needs to match the runtime version linked by neovim |
i have that config and the default, neither work, both say neovim is compiled with version 12 and the parser is 13 |
The problem has fixed itself, after i switched to unstable from master |
Teto also bumped the flake in core/contrib, which this repo wraps |
I still have this problem after a fresh install of home-manager. I get this when opening a nix file:
I have this config related to neovim:
and enabling neovim (excerpt from the config):
|
This is the overlay. FWIW tree-sitter is not guaranteed to work with 0.5, and nvim-treesitter (the plugin) may break compatibility with 0.5 at any time. 0.5 should be in nixpkgs-unstable now. You shouldn't let tree-sitter install the parsers. You should install them from nixpkgs. Make sure you clear all parsers/disable automatic parser installation with treesitter (rm -rf ~/.local/share/nvim/parse) and then add the following to HM:
|
@mjlbach when you say not to let tree-sitter install parsers, do you mean don't do stuff like |
Yes, if you're using a non-nixos system, this will guarantee that the runtime treesitter ABI and parser's ABI match |
Thanks @mjlbach , seems my problem is that the version of tree-sitter is 0.19+ in nixpkgs, while the supported version is 0.18+, not sure if this this something in my plugins or in neovim itself. I tried to override these in my home.nix as follows:
But it seems to drag in tree-sitter 0.19 nevertheless:
I might not be able to override the neovim build setup correctly I guess. Maybe there should be an override possibility to select custom version of tree-sitter used by neovim? I've stumbled into this before and it seems to be a reoccurring problem. |
again i come back, as neovim is linked to glibc 2.32, however treesitter requires, and the current glibc version is 2.33 |
i managed to just override the buildInputs to use the current nixpkgs gcc and glibc |
Should I be able to do this for all parsers? NBD but I noticed xdg.configFile."nvim/parser/comment.so".source = "${pkgs.tree-sitter.builtGrammars.tree-sitter-comment}/parser"; results in
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-get-nvim-treesitter-working-for-latex-files/18908/1 |
can you show how you did this? |
Continuing neovim/neovim#15019
The text was updated successfully, but these errors were encountered: