nixeovim/modules/plugins/navigation/telescope.nix

36 lines
822 B
Nix
Raw Normal View History

2024-04-26 02:08:23 +03:00
{ 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;
};
};
}