mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 10:48:35 +02:00
plugins/package-info: add telescope integration
This commit is contained in:
parent
d4b1827606
commit
b34379e981
2 changed files with 28 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -91,6 +92,8 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
enableTelescope = lib.mkEnableOption "the `package_info` telescope picker.";
|
||||||
|
|
||||||
packageManagerPackage =
|
packageManagerPackage =
|
||||||
lib.mkPackageOption pkgs
|
lib.mkPackageOption pkgs
|
||||||
[
|
[
|
||||||
|
@ -104,5 +107,18 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: { extraPackages = [ cfg.packageManagerPackage ]; };
|
extraConfig = cfg: {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
|
||||||
|
message = ''
|
||||||
|
Nixvim (plugins.package-info): The telescope integration needs telescope to function as intended.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
extraPackages = [ cfg.packageManagerPackage ];
|
||||||
|
|
||||||
|
plugins.telescope.enabledExtensions = lib.mkIf cfg.enableTelescope [ "package_info" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
with-telescope = {
|
||||||
|
plugins = {
|
||||||
|
telescope.enable = true;
|
||||||
|
|
||||||
|
package-info = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue