plugins/telescope-manix: init

This commit is contained in:
Austin Horstman 2024-09-17 22:22:45 -05:00
parent 6cbf441c22
commit 650e204c07
No known key found for this signature in database
3 changed files with 86 additions and 0 deletions

View file

@ -4,6 +4,7 @@
./frecency.nix ./frecency.nix
./fzf-native.nix ./fzf-native.nix
./fzy-native.nix ./fzy-native.nix
./manix.nix
./media-files.nix ./media-files.nix
./ui-select.nix ./ui-select.nix
./undo.nix ./undo.nix

View file

@ -0,0 +1,36 @@
{
lib,
config,
pkgs,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
telescopeHelpers = import ./_helpers.nix { inherit lib config pkgs; };
in
telescopeHelpers.mkExtension {
name = "manix";
package = "telescope-manix";
settingsOptions = {
manix_args = defaultNullOpts.mkListOf lib.types.str [ ] "CLI arguments to pass to manix.";
cword = defaultNullOpts.mkBool false ''
Set to `true` if you want to use the current word as the search query.
'';
};
settingsExample = {
cword = true;
};
extraOptions = {
manixPackage = lib.mkPackageOption pkgs "manix" {
nullable = true;
};
};
extraConfig = cfg: {
extraPackages = [ pkgs.manix ];
};
}

View file

@ -0,0 +1,49 @@
{
empty = {
plugins.telescope = {
enable = true;
extensions.manix.enable = true;
};
};
default = {
plugins.telescope = {
enable = true;
extensions.manix = {
enable = true;
settings = {
manix_args = [ ];
cword = false;
};
};
};
};
example = {
plugins.telescope = {
enable = true;
extensions.manix = {
enable = true;
settings = {
manix_args = [ "-s" ];
cword = true;
};
};
};
};
no-packages = {
plugins.telescope = {
enable = true;
extensions.manix = {
enable = true;
manixPackage = null;
};
};
};
}