mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 02:08:40 +02:00
telescope-fzy-native: init plugin
This commit is contained in:
parent
40b3ece389
commit
004824877f
2 changed files with 34 additions and 0 deletions
|
@ -8,6 +8,7 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./frecency.nix
|
./frecency.nix
|
||||||
./fzf-native.nix
|
./fzf-native.nix
|
||||||
|
./fzy-native.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO:add support for aditional filetypes. This requires autocommands!
|
# TODO:add support for aditional filetypes. This requires autocommands!
|
||||||
|
|
33
plugins/telescope/fzy-native.nix
Normal file
33
plugins/telescope/fzy-native.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ pkgs, config, lib, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.programs.nixvim.plugins.telescope.extensions.fzy-native;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.programs.nixvim.plugins.telescope.extensions.fzy-native = {
|
||||||
|
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 {
|
||||||
|
programs.nixvim.extraPlugins = [ pkgs.vimPlugins.telescope-fzy-native-nvim ];
|
||||||
|
|
||||||
|
programs.nixvim.plugins.telescope.enabledExtensions = [ "fzy_native" ];
|
||||||
|
programs.nixvim.plugins.telescope.extensionConfig."fzy_native" = configuration;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue