From f856d3df2bfef61464d932beec2597ab391dfc85 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Wed, 3 Jun 2026 22:49:12 -0500 Subject: fix boneheaded if statement and also fix installAllFromPackageSet --- home-manager/neovim.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'home-manager/neovim.nix') diff --git a/home-manager/neovim.nix b/home-manager/neovim.nix index 5b8447d..2b19257 100644 --- a/home-manager/neovim.nix +++ b/home-manager/neovim.nix @@ -23,10 +23,10 @@ parserDir = let allTSParserPackages = builtins.filter lib.isDerivation - (builtins.attrValues config.plugins.treesitter.parsers.installAllFrom); + (builtins.attrValues cfg.plugins.treesitter.parsers.installAllFromPackageSet); in pkgs.symlinkJoin { name = "nvim-treesitter-parsers"; - paths = if cfg.plugins.treesitter.parsers.installAll then cfg.plugins.treesitter.parsers.packages else allTSParserPackages; + paths = if cfg.plugins.treesitter.parsers.installAll then allTSParserPackages else cfg.plugins.treesitter.parsers.packages; }; finalPackage = pkgs.symlinkJoin { @@ -71,8 +71,11 @@ in { enable = lib.mkEnableOption "install treesitter and parsers as nvim plugins"; pluginPackage = lib.mkPackageOption pkgs.vimPlugins "nvim-treesitter" {}; parsers.installAll = lib.mkEnableOption "install all available parsers. overrides `parsers.packages`"; - parsers.installAllFrom = lib.mkPackageOption pkgs.vimPlugins "nvim-treesitter-parsers" { - extraDescription = "parent package from which to install all treesitter parsers"; + parsers.installAllFromPackageSet = lib.mkOption { + type = lib.types.attrsOf lib.types.anything; + default = pkgs.vimPlugins.nvim-treesitter-parsers; + defaultText = lib.literalExpression "pkgs.vimPlugins.nvim-treesitter-parsers"; + description = "parent package from which to install all treesitter parsers"; }; parsers.packages = lib.mkOption { type = lib.types.listOf lib.types.package; -- cgit v1.2.3