Skip to content

Commit

Permalink
install grammers the nix way
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanisaacs committed Sep 15, 2021
1 parent 9c7cf61 commit d4dfad8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/buildPlugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
final: prev:
let
inherit (prev.vimUtils) buildVimPluginFrom2Nix;

treesitterGrammars = prev.tree-sitter.withPlugins (_: prev.tree-sitter.allGrammars);

buildPlug = name: buildVimPluginFrom2Nix {
pname = name;
version = "master";
src = builtins.getAttr name inputs;
postPatch = if (name == "nvim-treesitter") then ''
rm -r parser
ln -s ${treesitterGrammars} parser
'' else "";
};
in
{
Expand Down

0 comments on commit d4dfad8

Please sign in to comment.