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 ]; maintainers = [ maintainers.GaetanLepage ];
extraOptions = { extraOptions = {
curlPackage = helpers.mkPackageOption { curlPackage = lib.mkPackageOption pkgs "curl" {
name = "curl"; nullable = true;
default = pkgs.curl;
}; };
}; };

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -72,13 +72,8 @@ helpers.neovim-plugin.mkNeovimPlugin {
}; };
extraOptions = { extraOptions = {
glowPackage = helpers.mkPackageOption { glowPackage = lib.mkPackageOption pkgs "glow" {
description = '' nullable = true;
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";
}; };
}; };

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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