From 8495dc730f1f308d544164adbe9c1aa074ff1de8 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 10 May 2024 22:28:55 +0300 Subject: [PATCH] modules/nvim-treesitter: fix extra grammars --- modules/plugins/style/nvim-treesitter.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/plugins/style/nvim-treesitter.nix b/modules/plugins/style/nvim-treesitter.nix index 8a8c82c..29eca91 100644 --- a/modules/plugins/style/nvim-treesitter.nix +++ b/modules/plugins/style/nvim-treesitter.nix @@ -1,14 +1,14 @@ { config, lib, pkgs, ... }: let - inherit (builtins) elem attrNames; + inherit (builtins) attrNames; inherit (lib.nix2lua) pipe1 require call0 set; cfg = config.plugins.style.nvim-treesitter; treesitterWithGrammars = (cfg.treesitter.package.override { inherit (cfg) extraGrammars; - }).withPlugins (lib.filterAtttrs (k: elem k (attrNames cfg.extraGrammars))); + }).withPlugins (p: map (k: p.${k}) (attrNames cfg.extraGrammars)); nvimTreeSitterWithBuiltinGrammars = if cfg.grammars == null then cfg.package.withAllGrammars @@ -35,7 +35,6 @@ let '' )) ); - }); in {