plugins: remove all uses of lib.nixvim.mkPluginPackageOption

This commit is contained in:
Matt Sturgeon 2024-09-04 22:00:43 +01:00
parent ae3a2c9d10
commit 7409e80bd2
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
77 changed files with 462 additions and 77 deletions

View file

@ -54,7 +54,12 @@ in
plugins.alpha = {
enable = mkEnableOption "alpha-nvim";
package = helpers.mkPluginPackageOption "alpha-nvim" pkgs.vimPlugins.alpha-nvim;
package = lib.mkPackageOption pkgs "alpha-nvim" {
default = [
"vimPlugins"
"alpha-nvim"
];
};
# TODO: deprecated 2024-08-29 remove after 24.11
iconsEnabled = mkOption {

View file

@ -13,7 +13,12 @@ in
options.plugins.auto-session = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "auto-session";
package = helpers.mkPluginPackageOption "auto-session" pkgs.vimPlugins.auto-session;
package = lib.mkPackageOption pkgs "auto-session" {
default = [
"vimPlugins"
"auto-session"
];
};
logLevel = helpers.defaultNullOpts.mkEnum [
"debug"

View file

@ -15,7 +15,12 @@ in
options.plugins.autoclose = {
enable = mkEnableOption "autoclose.nvim";
package = helpers.mkPluginPackageOption "autoclose.nvim" pkgs.vimPlugins.autoclose-nvim;
package = lib.mkPackageOption pkgs "autoclose.nvim" {
default = [
"vimPlugins"
"autoclose-nvim"
];
};
keys = helpers.mkNullOrOption (with types; attrsOf anything) ''
Configures various options, such as shortcuts for pairs, what pair of characters to use in the

View file

@ -88,7 +88,12 @@ in
options.plugins.clipboard-image = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "clipboard-image.nvim";
package = helpers.mkPluginPackageOption "clipboard-image.nvim" pkgs.vimPlugins.clipboard-image-nvim;
package = lib.mkPackageOption pkgs "clipboard-image.nvim" {
default = [
"vimPlugins"
"clipboard-image-nvim"
];
};
clipboardPackage = mkOption {
type = with types; nullOr package;

View file

@ -16,7 +16,12 @@ in
plugins.commentary = {
enable = mkEnableOption "commentary";
package = helpers.mkPluginPackageOption "commentary" pkgs.vimPlugins.vim-commentary;
package = lib.mkPackageOption pkgs "commentary" {
default = [
"vimPlugins"
"vim-commentary"
];
};
};
};

View file

@ -13,7 +13,12 @@ in
options.plugins.conjure = {
enable = mkEnableOption "Conjure";
package = helpers.mkPluginPackageOption "conjure" pkgs.vimPlugins.conjure;
package = lib.mkPackageOption pkgs "conjure" {
default = [
"vimPlugins"
"conjure"
];
};
};
config = mkIf cfg.enable { extraPlugins = [ cfg.package ]; };

View file

@ -63,7 +63,12 @@ in
options.plugins.coverage = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nvim-coverage";
package = helpers.mkPluginPackageOption "nvim-coverage" pkgs.vimPlugins.nvim-coverage;
package = lib.mkPackageOption pkgs "nvim-coverage" {
default = [
"vimPlugins"
"nvim-coverage"
];
};
keymapsSilent = mkOption {
type = types.bool;

View file

@ -13,7 +13,12 @@ in
options.plugins.cursorline = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nvim-cursorline";
package = helpers.mkPluginPackageOption "nvim-cursorline" pkgs.vimPlugins.nvim-cursorline;
package = lib.mkPackageOption pkgs "nvim-cursorline" {
default = [
"vimPlugins"
"nvim-cursorline"
];
};
cursorline = {
enable = helpers.defaultNullOpts.mkBool true "Show / hide cursorline in connection with cursor moving.";

View file

@ -14,7 +14,12 @@ in
plugins.easyescape = {
enable = mkEnableOption "easyescape";
package = helpers.mkPluginPackageOption "easyescape" pkgs.vimPlugins.vim-easyescape;
package = lib.mkPackageOption pkgs "easyescape" {
default = [
"vimPlugins"
"vim-easyescape"
];
};
};
};
config = mkIf cfg.enable { extraPlugins = [ cfg.package ]; };

View file

@ -200,7 +200,12 @@ in
{
enable = mkEnableOption "floaterm";
package = helpers.mkPluginPackageOption "floaterm" pkgs.vimPlugins.vim-floaterm;
package = lib.mkPackageOption pkgs "floaterm" {
default = [
"vimPlugins"
"vim-floaterm"
];
};
keymaps = keymapOptions;
}

View file

@ -14,7 +14,12 @@ in
plugins.hardtime = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "hardtime";
package = helpers.mkPluginPackageOption "hardtime" pkgs.vimPlugins.hardtime-nvim;
package = lib.mkPackageOption pkgs "hardtime" {
default = [
"vimPlugins"
"hardtime-nvim"
];
};
maxTime = helpers.defaultNullOpts.mkUnsignedInt 1000 ''
Maximum time (in milliseconds) to consider key presses as repeated.

View file

@ -25,7 +25,12 @@ in
options.plugins.harpoon = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "harpoon";
package = helpers.mkPluginPackageOption "harpoon" pkgs.vimPlugins.harpoon;
package = lib.mkPackageOption pkgs "harpoon" {
default = [
"vimPlugins"
"harpoon"
];
};
enableTelescope = mkEnableOption "telescope integration";

View file

@ -87,7 +87,12 @@ in
// {
enable = mkEnableOption "vim-illuminate";
package = mkPluginPackageOption "vim-illuminate" pkgs.vimPlugins.vim-illuminate;
package = lib.mkPackageOption pkgs "vim-illuminate" {
default = [
"vimPlugins"
"vim-illuminate"
];
};
filetypeOverrides =
helpers.defaultNullOpts.mkAttrsOf (types.submodule { options = commonOptions; }) { }

View file

@ -14,7 +14,12 @@ in
plugins.intellitab = {
enable = mkEnableOption "intellitab.nvim";
package = helpers.mkPluginPackageOption "intellitab.nvim" pkgs.vimPlugins.intellitab-nvim;
package = lib.mkPackageOption pkgs "intellitab.nvim" {
default = [
"vimPlugins"
"intellitab-nvim"
];
};
};
};

View file

@ -13,7 +13,12 @@ with lib;
options.plugins.lastplace = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "lastplace";
package = helpers.mkPluginPackageOption "lastplace" pkgs.vimPlugins.nvim-lastplace;
package = lib.mkPackageOption pkgs "lastplace" {
default = [
"vimPlugins"
"nvim-lastplace"
];
};
ignoreBuftype = helpers.defaultNullOpts.mkListOf types.str [
"quickfix"

View file

@ -13,7 +13,12 @@ in
options.plugins.leap = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "leap.nvim";
package = helpers.mkPluginPackageOption "leap.nvim" pkgs.vimPlugins.leap-nvim;
package = lib.mkPackageOption pkgs "leap.nvim" {
default = [
"vimPlugins"
"leap-nvim"
];
};
addDefaultMappings = mkOption {
type = types.bool;

View file

@ -13,7 +13,12 @@ in
options.plugins.mark-radar = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "mark-radar";
package = helpers.mkPluginPackageOption "mark-radar" pkgs.vimPlugins.mark-radar-nvim;
package = lib.mkPackageOption pkgs "mark-radar" {
default = [
"vimPlugins"
"mark-radar-nvim"
];
};
setDefaultMappings = helpers.defaultNullOpts.mkBool true "Whether to set default mappings.";

View file

@ -15,7 +15,12 @@ in
options.plugins.marks = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "marks.nvim";
package = helpers.mkPluginPackageOption "marks.nvim" pkgs.vimPlugins.marks-nvim;
package = lib.mkPackageOption pkgs "marks.nvim" {
default = [
"vimPlugins"
"marks-nvim"
];
};
builtinMarks =
helpers.defaultNullOpts.mkListOf

View file

@ -13,7 +13,12 @@ in
options.plugins.mini = {
enable = mkEnableOption "mini.nvim";
package = helpers.mkPluginPackageOption "mini.nvim" pkgs.vimPlugins.mini-nvim;
package = lib.mkPackageOption pkgs "mini.nvim" {
default = [
"vimPlugins"
"mini-nvim"
];
};
modules = mkOption {
type = with types; attrsOf attrs;

View file

@ -13,7 +13,12 @@ in
options.plugins.mkdnflow = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "mkdnflow.nvim";
package = helpers.mkPluginPackageOption "mkdnflow.nvim" pkgs.vimPlugins.mkdnflow-nvim;
package = lib.mkPackageOption pkgs "mkdnflow.nvim" {
default = [
"vimPlugins"
"mkdnflow-nvim"
];
};
modules =
mapAttrs

View file

@ -48,7 +48,12 @@ in
plugins.multicursors = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "multicursors.nvim";
package = helpers.mkPluginPackageOption "multicursors.nvim" pkgs.vimPlugins.multicursors-nvim;
package = lib.mkPackageOption pkgs "multicursors.nvim" {
default = [
"vimPlugins"
"multicursors-nvim"
];
};
debugMode = helpers.defaultNullOpts.mkBool false "Enable debug mode.";

View file

@ -16,7 +16,12 @@ in
options.plugins.navbuddy = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nvim-navbuddy";
package = helpers.mkPluginPackageOption "nvim-navbuddy" pkgs.vimPlugins.nvim-navbuddy;
package = lib.mkPackageOption pkgs "nvim-navbuddy" {
default = [
"vimPlugins"
"nvim-navbuddy"
];
};
window = {
border = helpers.defaultNullOpts.mkBorder "rounded" "window border" ''

View file

@ -47,7 +47,12 @@ in
options.plugins.neogen = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "neogen";
package = helpers.mkPluginPackageOption "neogen" pkgs.vimPlugins.neogen;
package = lib.mkPackageOption pkgs "neogen" {
default = [
"vimPlugins"
"neogen"
];
};
keymaps = mapAttrs (
optionsName: properties: helpers.mkNullOrOption types.str properties.description

View file

@ -13,7 +13,12 @@ with lib;
options.plugins.neorg = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "neorg";
package = helpers.mkPluginPackageOption "neorg" pkgs.vimPlugins.neorg;
package = lib.mkPackageOption pkgs "neorg" {
default = [
"vimPlugins"
"neorg"
];
};
lazyLoading = helpers.defaultNullOpts.mkBool false '''';

View file

@ -10,7 +10,12 @@ with lib;
options.plugins.netman = {
enable = mkEnableOption "netman.nvim, a framework to access remote resources";
package = helpers.mkPluginPackageOption "netman.nvim" pkgs.vimPlugins.netman-nvim;
package = lib.mkPackageOption pkgs "netman.nvim" {
default = [
"vimPlugins"
"netman-nvim"
];
};
neoTreeIntegration = mkEnableOption "support for netman as a neo-tree source";
};

View file

@ -13,7 +13,12 @@ in
options.plugins.nix-develop = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nix-develop.nvim";
package = helpers.mkPluginPackageOption "nix-develop.nvim" pkgs.vimPlugins.nix-develop-nvim;
package = lib.mkPackageOption pkgs "nix-develop.nvim" {
default = [
"vimPlugins"
"nix-develop-nvim"
];
};
ignoredVariables = mkOption {
type = with types; attrsOf bool;

View file

@ -13,7 +13,12 @@ in
options.plugins.notify = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nvim-notify";
package = helpers.mkPluginPackageOption "nvim-notify" pkgs.vimPlugins.nvim-notify;
package = lib.mkPackageOption pkgs "nvim-notify" {
default = [
"vimPlugins"
"nvim-notify"
];
};
level = helpers.defaultNullOpts.mkLogLevel "info" ''
Minimum log level to display. See `vim.log.levels`.

View file

@ -13,7 +13,12 @@ in
options.plugins.nvim-bqf = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nvim-bqf";
package = helpers.mkPluginPackageOption "nvim-bqf" pkgs.vimPlugins.nvim-bqf;
package = lib.mkPackageOption pkgs "nvim-bqf" {
default = [
"vimPlugins"
"nvim-bqf"
];
};
autoEnable = helpers.defaultNullOpts.mkBool true ''
Enable nvim-bqf in quickfix window automatically.

View file

@ -104,7 +104,12 @@ in
plugins.nvim-colorizer = {
enable = mkEnableOption "nvim-colorizer";
package = helpers.mkPluginPackageOption "nvim-colorizer" pkgs.vimPlugins.nvim-colorizer-lua;
package = lib.mkPackageOption pkgs "nvim-colorizer" {
default = [
"vimPlugins"
"nvim-colorizer-lua"
];
};
fileTypes = mkOption {
description = "Enable and/or configure highlighting for certain filetypes";

View file

@ -27,7 +27,12 @@ with lib;
'';
};
package = helpers.mkPluginPackageOption "nvim-osc52" pkgs.vimPlugins.nvim-osc52;
package = lib.mkPackageOption pkgs "nvim-osc52" {
default = [
"vimPlugins"
"nvim-osc52"
];
};
maxLength = helpers.defaultNullOpts.mkInt 0 "Maximum length of selection (0 for no limit)";
silent = helpers.defaultNullOpts.mkBool false "Disable message on successful copy";

View file

@ -13,7 +13,12 @@ in
options.plugins.nvim-ufo = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "nvim-ufo";
package = helpers.mkPluginPackageOption "nvim-ufo" pkgs.vimPlugins.nvim-ufo;
package = lib.mkPackageOption pkgs "nvim-ufo" {
default = [
"vimPlugins"
"nvim-ufo"
];
};
openFoldHlTimeout = helpers.defaultNullOpts.mkInt 400 ''
Time in millisecond between the range to be highlgihted and to be cleared

View file

@ -63,7 +63,12 @@ in
options.plugins.ollama = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "ollama.nvim";
package = helpers.mkPluginPackageOption "ollama.nvim" pkgs.vimPlugins.ollama-nvim;
package = lib.mkPackageOption pkgs "ollama.nvim" {
default = [
"vimPlugins"
"ollama-nvim"
];
};
model = helpers.defaultNullOpts.mkStr "mistral" ''
The default model to use.

View file

@ -10,7 +10,12 @@ with lib;
options.plugins.persistence = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "persistence.nvim";
package = helpers.mkPluginPackageOption "persistence.nvim" pkgs.vimPlugins.persistence-nvim;
package = lib.mkPackageOption pkgs "persistence.nvim" {
default = [
"vimPlugins"
"persistence-nvim"
];
};
dir = helpers.defaultNullOpts.mkStr {
__raw = ''vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/")'';

View file

@ -13,7 +13,12 @@ in
options = {
plugins.presence-nvim = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "presence-nvim";
package = helpers.mkPluginPackageOption "presence-nvim" pkgs.vimPlugins.presence-nvim;
package = lib.mkPackageOption pkgs "presence-nvim" {
default = [
"vimPlugins"
"presence-nvim"
];
};
# General options.
autoUpdate = helpers.defaultNullOpts.mkBool true ''

View file

@ -13,7 +13,12 @@ in
options.plugins.quickmath = {
enable = mkEnableOption "quickmath.nvim";
package = helpers.mkPluginPackageOption "quickmath.nvim" pkgs.vimPlugins.quickmath-nvim;
package = lib.mkPackageOption pkgs "quickmath.nvim" {
default = [
"vimPlugins"
"quickmath-nvim"
];
};
keymap = {
key = helpers.mkNullOrOption types.str "Keymap to run the `:Quickmath` command.";

View file

@ -14,7 +14,12 @@ in
options.plugins.${pluginName} = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption pluginName;
package = helpers.mkPluginPackageOption pluginName pkgs.vimPlugins.nvim-spider;
package = lib.mkPackageOption pkgs pluginName {
default = [
"vimPlugins"
"nvim-spider"
];
};
skipInsignificantPunctuation = helpers.defaultNullOpts.mkBool true "Whether to skip insignificant punctuation.";

View file

@ -15,7 +15,12 @@ in
options.plugins.startup = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "startup.nvim";
package = helpers.mkPluginPackageOption "startup.nvim" pkgs.vimPlugins.startup-nvim;
package = lib.mkPackageOption pkgs "startup.nvim" {
default = [
"vimPlugins"
"startup-nvim"
];
};
theme = helpers.defaultNullOpts.mkStr "dashboard" ''
Use a pre-defined theme.

View file

@ -13,7 +13,12 @@ in
options.plugins.vim-bbye = {
enable = mkEnableOption "vim-bbye";
package = helpers.mkPluginPackageOption "vim-bbye" pkgs.vimPlugins.vim-bbye;
package = lib.mkPackageOption pkgs "vim-bbye" {
default = [
"vimPlugins"
"vim-bbye"
];
};
keymapsSilent = mkOption {
type = types.bool;

View file

@ -10,7 +10,12 @@ with lib;
options.plugins.vim-matchup = {
enable = mkEnableOption "vim-matchup";
package = helpers.mkPluginPackageOption "vim-matchup" pkgs.vimPlugins.vim-matchup;
package = lib.mkPackageOption pkgs "vim-matchup" {
default = [
"vimPlugins"
"vim-matchup"
];
};
treesitterIntegration = {
enable = mkEnableOption "treesitter integration";

View file

@ -66,7 +66,12 @@ in
options.plugins.wilder = helpers.neovim-plugin.extraOptionsOptions // {
enable = mkEnableOption "wilder-nvim";
package = helpers.mkPluginPackageOption "wilder-nvim" pkgs.vimPlugins.wilder-nvim;
package = lib.mkPackageOption pkgs "wilder-nvim" {
default = [
"vimPlugins"
"wilder-nvim"
];
};
### Setup options ###
enableCmdlineEnter = helpers.defaultNullOpts.mkBool true ''