telescope/fzf-native: package option

This commit is contained in:
Alexander Nortung 2023-01-17 22:51:51 +01:00
parent 46baee2ece
commit 922f237add

View file

@ -7,6 +7,12 @@ in
options.plugins.telescope.extensions.fzf-native = { options.plugins.telescope.extensions.fzf-native = {
enable = mkEnableOption "Enable fzf-native"; enable = mkEnableOption "Enable fzf-native";
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.telescope-fzf-native-nvim;
description = "Plugin to use for telescope extension fzf-native";
};
fuzzy = mkOption { fuzzy = mkOption {
type = types.nullOr types.bool; type = types.nullOr types.bool;
description = "Whether to fuzzy search. False will do exact matching"; description = "Whether to fuzzy search. False will do exact matching";
@ -36,7 +42,7 @@ in
case_mode = cfg.caseMode; case_mode = cfg.caseMode;
}; };
in mkIf cfg.enable { in mkIf cfg.enable {
extraPlugins = [ pkgs.vimPlugins.telescope-fzf-native-nvim ]; extraPlugins = [ cfg.package ];
plugins.telescope.enabledExtensions = [ "fzf" ]; plugins.telescope.enabledExtensions = [ "fzf" ];
plugins.telescope.extensionConfig."fzf" = configuration; plugins.telescope.extensionConfig."fzf" = configuration;