modules/dependencies: add ripgrep

This commit is contained in:
Gaetan Lepage 2025-04-07 18:36:51 +02:00 committed by nix-infra-bot
parent 238ffa110a
commit d6cdbf36b2
7 changed files with 54 additions and 59 deletions

View file

@ -1,6 +1,5 @@
{
lib,
pkgs,
...
}:
let
@ -13,6 +12,19 @@ mkExtension {
extensionName = "live_grep_args";
package = "telescope-live-grep-args-nvim";
imports = [
# TODO: added 2025-04-07, remove after 25.05
(lib.nixvim.mkRemovedPackageOptionModule {
plugin = [
"telescope"
"extensions"
"live-grep-args"
];
packageName = "ripgrep";
oldPackageName = "grep";
})
];
settingsOptions = {
auto_quoting = defaultNullOpts.mkBool true ''
Enable or disable auto quoting of searches.
@ -56,14 +68,7 @@ mkExtension {
theme = "dropdown";
};
extraOptions = {
grepPackage = lib.mkPackageOption pkgs "ripgrep" {
nullable = true;
example = "pkgs.gnugrep";
};
};
extraConfig = cfg: {
extraPackages = [ cfg.grepPackage ];
extraConfig = {
dependencies.ripgrep.enable = lib.mkDefault true;
};
}