Revert "vimPlugins.nvim-treesitter: collate grammars"

This reverts PR #319233. It caused a lot of weird regressions and a lot
of headaches for me. Even a 20% improvement isn't worth it.

Also see https://github.com/NixOS/nixpkgs/pull/319233#issuecomment-2339271761
This commit is contained in:
PerchunPak 2024-09-10 06:34:47 +02:00
parent ad595bade0
commit 7fc75e0242
No known key found for this signature in database
GPG Key ID: 313F67D1EAB770F9

View File

@ -36,22 +36,8 @@ let
# pkgs.vimPlugins.nvim-treesitter.withAllGrammars
withPlugins =
f: self.nvim-treesitter.overrideAttrs {
passthru.dependencies =
let
grammars = map grammarToPlugin
passthru.dependencies = map grammarToPlugin
(f (tree-sitter.builtGrammars // builtGrammars));
copyGrammar = grammar:
let name = lib.last (lib.splitString "-" grammar.name); in
"ln -sf ${grammar}/parser/${name}.so $out/parser/${name}.so";
in
[
(runCommand "vimplugin-treesitter-grammars"
{ meta.platforms = lib.platforms.all; }
''
mkdir -p $out/parser
${lib.concatMapStringsSep "\n" copyGrammar grammars}
'')
];
};
withAllGrammars = withPlugins (_: allGrammars);