2021-12-23 21:58:22 +01:00
|
|
|
{ pkgs, config, lib, ...}:
|
|
|
|
with lib;
|
|
|
|
let
|
2022-09-18 11:19:23 +01:00
|
|
|
cfg = config.plugins.telescope.extensions.fzy-native;
|
2021-12-23 21:58:22 +01:00
|
|
|
in
|
|
|
|
{
|
2022-09-18 11:19:23 +01:00
|
|
|
options.plugins.telescope.extensions.fzy-native = {
|
2021-12-23 21:58:22 +01:00
|
|
|
enable = mkEnableOption "Enable fzy-native";
|
|
|
|
|
|
|
|
overrideGenericSorter = mkOption {
|
|
|
|
type = types.nullOr types.bool;
|
|
|
|
description = "Override the generice sorter";
|
|
|
|
default = null;
|
|
|
|
};
|
|
|
|
overrideFileSorter = mkOption {
|
|
|
|
type = types.nullOr types.bool;
|
|
|
|
description = "Override the file sorter";
|
|
|
|
default = null;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = let
|
|
|
|
configuration = {
|
|
|
|
override_generic_sorter = cfg.overrideGenericSorter;
|
|
|
|
override_file_sorter = cfg.overrideFileSorter;
|
|
|
|
};
|
|
|
|
in mkIf cfg.enable {
|
2022-09-18 11:19:23 +01:00
|
|
|
extraPlugins = [ pkgs.vimPlugins.telescope-fzy-native-nvim ];
|
2021-12-23 21:58:22 +01:00
|
|
|
|
2022-09-18 11:19:23 +01:00
|
|
|
plugins.telescope.enabledExtensions = [ "fzy_native" ];
|
|
|
|
plugins.telescope.extensionConfig."fzy_native" = configuration;
|
2021-12-23 21:58:22 +01:00
|
|
|
};
|
|
|
|
}
|