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";
|
||||
direnv.default = "direnv";
|
||||
gcc.default = "gcc";
|
||||
gh.default = "gh";
|
||||
git = {
|
||||
default = "git";
|
||||
example = [ "gitMinimal" ];
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -14,6 +13,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
|
||||
maintainers = [ lib.maintainers.svl ];
|
||||
|
||||
imports = [
|
||||
# TODO: added 2025-04-07, remove after 25.05
|
||||
(lib.nixvim.mkRemovedPackageOptionModule {
|
||||
plugin = "octo";
|
||||
packageName = "gh";
|
||||
})
|
||||
];
|
||||
|
||||
settingsOptions = {
|
||||
use_local_fs = defaultNullOpts.mkBool false ''
|
||||
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 =
|
||||
cfg:
|
||||
lib.mkMerge [
|
||||
{ extraPackages = [ cfg.ghPackage ]; }
|
||||
{ dependencies.gh.enable = lib.mkDefault true; }
|
||||
(lib.mkIf (cfg.settings.picker == null || cfg.settings.picker == "telescope") {
|
||||
plugins.telescope.enable = lib.mkDefault true;
|
||||
})
|
||||
|
|
|
@ -103,10 +103,11 @@
|
|||
no-packages = {
|
||||
# Need to add gh executable to runtime path for plugin
|
||||
test.runNvim = false;
|
||||
plugins.web-devicons.enable = false;
|
||||
plugins.octo = {
|
||||
enable = true;
|
||||
ghPackage = null;
|
||||
|
||||
plugins = {
|
||||
web-devicons.enable = false;
|
||||
octo.enable = true;
|
||||
};
|
||||
dependencies.gh.enable = false;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue