mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/dependencies: add gh
This commit is contained in:
parent
5c5360698c
commit
662ad478f2
3 changed files with 15 additions and 13 deletions
|
@ -12,6 +12,7 @@ let
|
||||||
curl.default = "curl";
|
curl.default = "curl";
|
||||||
direnv.default = "direnv";
|
direnv.default = "direnv";
|
||||||
gcc.default = "gcc";
|
gcc.default = "gcc";
|
||||||
|
gh.default = "gh";
|
||||||
git = {
|
git = {
|
||||||
default = "git";
|
default = "git";
|
||||||
example = [ "gitMinimal" ];
|
example = [ "gitMinimal" ];
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -14,6 +13,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
maintainers = [ lib.maintainers.svl ];
|
maintainers = [ lib.maintainers.svl ];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
# TODO: added 2025-04-07, remove after 25.05
|
||||||
|
(lib.nixvim.mkRemovedPackageOptionModule {
|
||||||
|
plugin = "octo";
|
||||||
|
packageName = "gh";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
use_local_fs = defaultNullOpts.mkBool false ''
|
use_local_fs = defaultNullOpts.mkBool false ''
|
||||||
Use local files on right side of reviews.
|
Use local files on right side of reviews.
|
||||||
|
@ -168,17 +175,10 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = {
|
|
||||||
ghPackage = lib.mkPackageOption pkgs "GitHub CLI" {
|
|
||||||
default = "gh";
|
|
||||||
nullable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig =
|
extraConfig =
|
||||||
cfg:
|
cfg:
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{ extraPackages = [ cfg.ghPackage ]; }
|
{ dependencies.gh.enable = lib.mkDefault true; }
|
||||||
(lib.mkIf (cfg.settings.picker == null || cfg.settings.picker == "telescope") {
|
(lib.mkIf (cfg.settings.picker == null || cfg.settings.picker == "telescope") {
|
||||||
plugins.telescope.enable = lib.mkDefault true;
|
plugins.telescope.enable = lib.mkDefault true;
|
||||||
})
|
})
|
||||||
|
|
|
@ -103,10 +103,11 @@
|
||||||
no-packages = {
|
no-packages = {
|
||||||
# Need to add gh executable to runtime path for plugin
|
# Need to add gh executable to runtime path for plugin
|
||||||
test.runNvim = false;
|
test.runNvim = false;
|
||||||
plugins.web-devicons.enable = false;
|
|
||||||
plugins.octo = {
|
plugins = {
|
||||||
enable = true;
|
web-devicons.enable = false;
|
||||||
ghPackage = null;
|
octo.enable = true;
|
||||||
};
|
};
|
||||||
|
dependencies.gh.enable = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue