diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-06-03 22:49:12 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-06-03 22:49:12 -0500 |
| commit | f856d3df2bfef61464d932beec2597ab391dfc85 (patch) | |
| tree | 299da6e5d658f3051c30742f67545514a48905b9 | |
| parent | f75388f60a0292fb6aa1ba922d9ed34eb2e6b405 (diff) | |
| download | nixos-f856d3df2bfef61464d932beec2597ab391dfc85.tar.xz nixos-f856d3df2bfef61464d932beec2597ab391dfc85.zip | |
| -rw-r--r-- | home-manager/neovim.nix | 11 |
1 files changed, 7 insertions, 4 deletions
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; |
