mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 00:34:34 +02:00
plugins/telescope: add ui-select extension
This commit is contained in:
parent
e42a2b0f6b
commit
37d124e946
3 changed files with 57 additions and 0 deletions
|
@ -15,6 +15,7 @@ in {
|
||||||
./fzy-native.nix
|
./fzy-native.nix
|
||||||
./media-files.nix
|
./media-files.nix
|
||||||
./project-nvim.nix
|
./project-nvim.nix
|
||||||
|
./ui-select.nix
|
||||||
./undo.nix
|
./undo.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
34
plugins/telescope/ui-select.nix
Normal file
34
plugins/telescope/ui-select.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
helpers,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.plugins.telescope.extensions.ui-select;
|
||||||
|
in {
|
||||||
|
options.plugins.telescope.extensions.ui-select = {
|
||||||
|
enable = mkEnableOption "ui-select extension for telescope";
|
||||||
|
|
||||||
|
package = helpers.mkPackageOption "telescope extension ui-select" pkgs.vimPlugins.telescope-ui-select-nvim;
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = with types; attrsOf anything;
|
||||||
|
default = {};
|
||||||
|
example = {
|
||||||
|
specific_opts.codeactions = false;
|
||||||
|
};
|
||||||
|
description = "Settings for this extension.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
plugins.telescope = {
|
||||||
|
enabledExtensions = ["ui-select"];
|
||||||
|
extensionConfig."ui-select" = cfg.settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPlugins = [cfg.package];
|
||||||
|
};
|
||||||
|
}
|
22
tests/test-sources/plugins/telescope/ui-select.nix
Normal file
22
tests/test-sources/plugins/telescope/ui-select.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions.ui-select.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extensions.ui-select = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
specific_opts.codeactions = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue