mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 02:38:38 +02:00
plugins/telescope/extensions: use lib.mkPackageOption
This commit is contained in:
parent
1fd4b6c739
commit
dfb754cdc4
8 changed files with 22 additions and 11 deletions
|
@ -1,12 +1,18 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.nixvim) mkPluginPackageOption mkSettingsOption toSnakeCase;
|
||||
inherit (lib.nixvim) mkSettingsOption toSnakeCase;
|
||||
inherit (lib) mkPackageOption;
|
||||
in
|
||||
rec {
|
||||
mkExtension =
|
||||
{
|
||||
name,
|
||||
defaultPackage,
|
||||
package,
|
||||
extensionName ? name,
|
||||
settingsOptions ? { },
|
||||
settingsExample ? null,
|
||||
|
@ -41,7 +47,12 @@ rec {
|
|||
options.plugins.telescope.extensions.${name} = {
|
||||
enable = lib.mkEnableOption "the `${name}` telescope extension";
|
||||
|
||||
package = mkPluginPackageOption name defaultPackage;
|
||||
package = mkPackageOption pkgs name {
|
||||
default = [
|
||||
"vimPlugins"
|
||||
package
|
||||
];
|
||||
};
|
||||
|
||||
settings = mkSettingsOption {
|
||||
description = "settings for the `${name}` telescope extension.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue