mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/git-worktree: remove with lib
This commit is contained in:
parent
ff7570d781
commit
7dd9684264
1 changed files with 3 additions and 4 deletions
|
@ -5,14 +5,13 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
cfg = config.plugins.git-worktree;
|
cfg = config.plugins.git-worktree;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
plugins.git-worktree = {
|
plugins.git-worktree = {
|
||||||
enable = mkEnableOption "git-worktree";
|
enable = lib.mkEnableOption "git-worktree";
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "git-worktree" {
|
package = lib.mkPackageOption pkgs "git-worktree" {
|
||||||
default = [
|
default = [
|
||||||
|
@ -25,7 +24,7 @@ in
|
||||||
nullable = true;
|
nullable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
enableTelescope = mkEnableOption "telescope integration";
|
enableTelescope = lib.mkEnableOption "telescope integration";
|
||||||
|
|
||||||
changeDirectoryCommand = helpers.defaultNullOpts.mkStr "cd" ''
|
changeDirectoryCommand = helpers.defaultNullOpts.mkStr "cd" ''
|
||||||
The vim command used to change to the new worktree directory.
|
The vim command used to change to the new worktree directory.
|
||||||
|
@ -65,7 +64,7 @@ in
|
||||||
inherit autopush;
|
inherit autopush;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
|
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue