36 lines
822 B
Nix
36 lines
822 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
let cfg = config.plugins.navigation.telescope; in
|
||
|
{
|
||
|
options.plugins.navigation.telescope = with lib; {
|
||
|
enable = mkEnableOption "telescope";
|
||
|
|
||
|
package = mkPackageOption pkgs.vimPlugins "telescope-nvim" { };
|
||
|
|
||
|
settings = mkOption {
|
||
|
type = types.attrs;
|
||
|
default = { };
|
||
|
description = ''
|
||
|
See: https://github.com/nvim-telescope/telescope.nvim?tab=readme-ov-file#customization
|
||
|
'';
|
||
|
example = {
|
||
|
pickers = {
|
||
|
find_files = {
|
||
|
theme = "dropdown";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
plugin.plenary-nvim = lib.mkDefault { isDependency = true; };
|
||
|
|
||
|
plugin.telescope-nvim = {
|
||
|
name = "telescope";
|
||
|
package = cfg.package;
|
||
|
setupSettings = cfg.settings;
|
||
|
};
|
||
|
};
|
||
|
}
|