mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/telescope-manix: init
This commit is contained in:
parent
6cbf441c22
commit
650e204c07
3 changed files with 86 additions and 0 deletions
|
@ -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
|
||||||
|
|
36
plugins/by-name/telescope/extensions/manix.nix
Normal file
36
plugins/by-name/telescope/extensions/manix.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
49
tests/test-sources/plugins/by-name/telescope/manix.nix
Normal file
49
tests/test-sources/plugins/by-name/telescope/manix.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue