plugins: remove all use of lib.nixvim.mkPackageOption

This commit is contained in:
Matt Sturgeon 2024-09-03 15:40:46 +01:00
parent 84676128f8
commit ae3a2c9d10
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
28 changed files with 73 additions and 95 deletions

View file

@ -13,9 +13,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
maintainers = [ maintainers.GaetanLepage ];
extraOptions = {
curlPackage = helpers.mkPackageOption {
name = "curl";
default = pkgs.curl;
curlPackage = lib.mkPackageOption pkgs "curl" {
nullable = true;
};
};

View file

@ -13,9 +13,8 @@ in
meta.maintainers = [ maintainers.GaetanLepage ];
options.plugins.cmp-fish = {
fishPackage = helpers.mkPackageOption {
name = "fish";
default = pkgs.fish;
fishPackage = lib.mkPackageOption pkgs "fish" {
nullable = true;
};
};

View file

@ -16,11 +16,14 @@ helpers.neovim-plugin.mkNeovimPlugin {
];
extraOptions = {
# TODO: should this enable option be replaced with `nullable = true` in the package option?
installArtifacts = mkEnableOption "and install coq-artifacts";
artifactsPackage = mkOption {
type = types.package;
description = "Package to use for coq-artifacts (when enabled with installArtifacts)";
default = pkgs.vimPlugins.coq-artifacts;
artifactsPackage = mkPackageOption pkgs "coq-artifacts" {
extraDescription = "Installed when `installArtifacts` is enabled.";
default = [
"vimPlugins"
"coq-artifacts"
];
};
};

View file

@ -62,9 +62,8 @@ in
"nvim-web-devicons"
] { nullable = true; };
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
sources =

View file

@ -46,9 +46,8 @@ in
"nvim-web-devicons"
] { nullable = true; };
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
disableNetrw = helpers.defaultNullOpts.mkBool false "Disable netrw";

View file

@ -1,5 +1,6 @@
{
helpers,
lib,
pkgs,
...
}:
@ -47,9 +48,8 @@ helpers.vim-plugin.mkVimPlugin {
};
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
};

View file

@ -13,9 +13,8 @@ helpers.vim-plugin.mkVimPlugin {
# In typical tpope fashion, this plugin has no config options
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
};

View file

@ -13,9 +13,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
maintainers = [ maintainers.GaetanLepage ];
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
};

View file

@ -16,9 +16,8 @@ in
package = helpers.mkPluginPackageOption "git-worktree" pkgs.vimPlugins.git-worktree-nvim;
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
enableTelescope = mkEnableOption "telescope integration";

View file

@ -4,7 +4,7 @@
...
}:
let
inherit (lib.nixvim) defaultNullOpts mkPackageOption;
inherit (lib.nixvim) defaultNullOpts;
types = lib.nixvim.nixvimTypes;
in
lib.nixvim.neovim-plugin.mkNeovimPlugin {
@ -128,9 +128,8 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
};
extraOptions = {
gitPackage = mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
};

View file

@ -16,9 +16,8 @@ in
package = helpers.mkPluginPackageOption "gitgutter" pkgs.vimPlugins.gitgutter;
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
recommendedSettings = mkOption {

View file

@ -242,9 +242,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
];
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
};

View file

@ -70,14 +70,12 @@ helpers.vim-plugin.mkVimPlugin {
};
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
lazygitPackage = helpers.mkPackageOption {
name = "lazygit";
default = pkgs.lazygit;
lazygitPackage = lib.mkPackageOption pkgs "lazygit" {
nullable = true;
};
};

View file

@ -101,9 +101,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
};
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
};

View file

@ -14,9 +14,9 @@ helpers.vim-plugin.mkVimPlugin {
maintainers = [ maintainers.GaetanLepage ];
extraOptions = {
godotPackage = helpers.mkPackageOption {
name = "godot";
default = pkgs.godot_4;
godotPackage = lib.mkPackageOption pkgs "godot" {
nullable = true;
default = "godot_4";
};
};

View file

@ -15,9 +15,9 @@ in
package = helpers.mkPluginPackageOption "lean-nvim" pkgs.vimPlugins.lean-nvim;
leanPackage = helpers.mkPackageOption {
name = "lean";
default = pkgs.lean4;
leanPackage = lib.mkPackageOption pkgs "lean" {
nullable = true;
default = "lean4";
};
lsp = helpers.defaultNullOpts.mkNullable (

View file

@ -45,9 +45,8 @@ mkVimPlugin {
];
extraOptions = {
ledgerPackage = helpers.mkPackageOption {
name = "ledger";
default = pkgs.ledger;
ledgerPackage = lib.mkPackageOption pkgs "ledger" {
nullable = true;
};
};

View file

@ -72,13 +72,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
};
extraOptions = {
glowPackage = helpers.mkPackageOption {
description = ''
Which package to use for `glow` in your `$PATH`.
Set to `null` to disable its automatic installation.
'';
default = pkgs.glow;
defaultText = lib.literalExpression "pkgs.glow";
glowPackage = lib.mkPackageOption pkgs "glow" {
nullable = true;
};
};

View file

@ -13,9 +13,8 @@ in
options.plugins.rust-tools = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "rust tools plugins";
package = helpers.mkPluginPackageOption "rust-tools" pkgs.vimPlugins.rust-tools-nvim;
serverPackage = helpers.mkPackageOption {
name = "rust-analyzer";
default = pkgs.rust-analyzer;
serverPackage = lib.mkPackageOption pkgs "rust-analyzer" {
nullable = true;
};
executor = helpers.defaultNullOpts.mkEnumFirstDefault [

View file

@ -16,9 +16,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
optionsRenamedToSettings = import ./renamed-options.nix;
extraOptions = {
rustAnalyzerPackage = helpers.mkPackageOption {
name = "rust-analyzer";
default = pkgs.rust-analyzer;
rustAnalyzerPackage = lib.mkPackageOption pkgs "rust-analyzer" {
nullable = true;
};
};

View file

@ -15,9 +15,8 @@ helpers.vim-plugin.mkVimPlugin {
maintainers = [ maintainers.nickhu ];
extraOptions = {
texpressoPackage = helpers.mkPackageOption {
name = "texpresso";
default = pkgs.texpresso;
texpressoPackage = lib.mkPackageOption pkgs "texpresso" {
nullable = true;
};
};

View file

@ -54,9 +54,13 @@ helpers.vim-plugin.mkVimPlugin {
};
extraOptions = {
texlivePackage = helpers.mkPackageOption {
name = "texlive";
default = pkgs.texlive.combined.scheme-medium;
texlivePackage = lib.mkPackageOption pkgs "texlive" {
nullable = true;
default = [
"texlive"
"combined"
"scheme-medium"
];
};
};

View file

@ -41,9 +41,8 @@ in
plugins.lazy = {
enable = mkEnableOption "lazy.nvim";
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
plugins =

View file

@ -14,9 +14,8 @@ in
plugins.packer = {
enable = mkEnableOption "packer.nvim";
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
plugins =

View file

@ -108,9 +108,8 @@ in
package = helpers.mkPluginPackageOption "lualine" pkgs.vimPlugins.lualine-nvim;
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
gitPackage = lib.mkPackageOption pkgs "git" {
nullable = true;
};
iconsEnabled = mkOption {

View file

@ -40,10 +40,9 @@ helpers.neovim-plugin.mkNeovimPlugin {
inherit settingsOptions settingsExample;
extraOptions = {
fzfPackage = helpers.mkPackageOption {
name = "fzf";
default = pkgs.fzf;
example = pkgs.skim;
fzfPackage = lib.mkPackageOption pkgs "fzf" {
nullable = true;
example = "pkgs.skim";
};
# TODO: deprecated 2024-08-29 remove after 24.11

View file

@ -10,7 +10,6 @@ let
defaultNullOpts
keymaps
mkNullOrOption'
mkPackageOption
transitionType
;
types = lib.nixvim.nixvimTypes;
@ -405,9 +404,8 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
todoTelescope = "TodoTelescope";
};
ripgrepPackage = mkPackageOption {
name = "ripgrep";
default = pkgs.ripgrep;
ripgrepPackage = lib.mkPackageOption pkgs "ripgrep" {
nullable = true;
};
};

View file

@ -108,9 +108,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
};
extraOptions = {
zkPackage = helpers.mkPackageOption {
name = "zk";
default = pkgs.zk;
zkPackage = lib.mkPackageOption pkgs "zk" {
nullable = true;
};
};
extraConfig = cfg: {