modules/nvim-treesitter: fix extra grammars
This commit is contained in:
parent
8d76150a25
commit
8495dc730f
1 changed files with 2 additions and 3 deletions
|
@ -1,14 +1,14 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) elem attrNames;
|
inherit (builtins) attrNames;
|
||||||
inherit (lib.nix2lua) pipe1 require call0 set;
|
inherit (lib.nix2lua) pipe1 require call0 set;
|
||||||
|
|
||||||
cfg = config.plugins.style.nvim-treesitter;
|
cfg = config.plugins.style.nvim-treesitter;
|
||||||
|
|
||||||
treesitterWithGrammars = (cfg.treesitter.package.override {
|
treesitterWithGrammars = (cfg.treesitter.package.override {
|
||||||
inherit (cfg) extraGrammars;
|
inherit (cfg) extraGrammars;
|
||||||
}).withPlugins (lib.filterAtttrs (k: elem k (attrNames cfg.extraGrammars)));
|
}).withPlugins (p: map (k: p.${k}) (attrNames cfg.extraGrammars));
|
||||||
|
|
||||||
nvimTreeSitterWithBuiltinGrammars =
|
nvimTreeSitterWithBuiltinGrammars =
|
||||||
if cfg.grammars == null then cfg.package.withAllGrammars
|
if cfg.grammars == null then cfg.package.withAllGrammars
|
||||||
|
@ -35,7 +35,6 @@ let
|
||||||
''
|
''
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue