Closed anna328p closed 1 month ago
So the parser is ending up at
$out/parser
instead of$out/parser/${language}.so
.
I think this is not actually the direct cause of the issue you're seeing since the grammars go through grammarToPlugin
(see the below, which precisely corrects the observed discrepancy)
You're not seeing the grammars when you nix build
because the grammars are in passthru.dependencies
. I explain how to properly build it in https://github.com/NixOS/nixpkgs/pull/319233#issuecomment-2308398048. The PR is broken, don't get me wrong, but I think not this directly :p.
For why your configuration is broken, see https://github.com/NixOS/nixpkgs/pull/201548. I think it's because of your dependency on v.nvim-treesitter-endwise
and v.nvim-treesitter-context
which pulls in a nvim-treesitter
without any grammars but I'm not sure.
Could that PR be merged quicker please? My editor setup is broken now :(
You can try giving https://github.com/NixOS/nixpkgs/pull/341079 an approval, I'm in the same boat as you (I don't have merge permissions).
Apologies for breaking your setup!
Describe the bug
I noticed that nvim wasn't loading any of my treesitter plugins. I decided to check the plugin directory.
hm. something is very wrong here. it isn't pulling in any grammars. let's investigate:
https://github.com/NixOS/nixpkgs/blob/7a33145986fa450a1e202728ad485755c28558e9/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix#L43-L45
ok, so it's looking for a file at
parser/${name}.so
. what does the grammar derivation look like?So the parser is ending up at
$out/parser
instead of$out/parser/${language}.so
. What does the grammar derivation's source look like?https://github.com/NixOS/nixpkgs/blob/7a33145986fa450a1e202728ad485755c28558e9/pkgs/development/tools/parsing/tree-sitter/grammar.nix#L7
Checking
git blame
, this code has been in place for years.Checking
git blame
fornvim-treesitter
, I find https://github.com/NixOS/nixpkgs/commit/54f33c58c45e4677699162dbd864adfd363377e1. It was merged three weeks ago.I see that https://github.com/NixOS/nixpkgs/pull/341079 is open. I couldn't find any information on this problem with GitHub search...
Could that PR be merged quicker please? My editor setup is broken now :(
Notify maintainers
@stephen-huan
Metadata
"x86_64-linux"
Linux 6.10.7, NixOS, 24.11 (Vicuna), 24.11.20240831.5154507
yes
yes
nix-env (Nix) 2.25.0pre20240807_cfe66dbe
/nix/store/fa03w7hljdlqzqxlh68cmhhp8yr8msk7-source
Add a :+1: reaction to issues you find important.