mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
37 lines
912 B
Nix
37 lines
912 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.plugins.telescope.extensions.fzy-native;
|
|
in {
|
|
options.plugins.telescope.extensions.fzy-native = {
|
|
enable = mkEnableOption "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 {
|
|
extraPlugins = [pkgs.vimPlugins.telescope-fzy-native-nvim];
|
|
|
|
plugins.telescope.enabledExtensions = ["fzy_native"];
|
|
plugins.telescope.extensionConfig."fzy_native" = configuration;
|
|
};
|
|
}
|