helpers/vim-plugin/mkVimPlugin: refactor

This commit is contained in:
Gaetan Lepage 2024-02-09 14:21:22 +01:00 committed by Gaétan Lepage
parent 66c069c48d
commit 3c174e874c
20 changed files with 739 additions and 744 deletions

View file

@ -3,11 +3,7 @@
nixvimOptions, nixvimOptions,
}: }:
with lib; { with lib; {
mkVimPlugin = { mkVimPlugin = config: {
config,
lib,
...
}: {
name, name,
description ? null, description ? null,
package ? null, package ? null,

View file

@ -1,11 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: }:
with lib; ( with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { helpers.vim-plugin.mkVimPlugin config {
name = "copilot-vim"; name = "copilot-vim";
description = "copilot.vim"; description = "copilot.vim";
package = pkgs.vimPlugins.copilot-vim; package = pkgs.vimPlugins.copilot-vim;
@ -39,4 +41,3 @@ with lib; (
}; };
}; };
} }
)

View file

@ -14,7 +14,7 @@ in
useDefaultPackage ? true, useDefaultPackage ? true,
... ...
}: }:
mkVimPlugin {inherit lib config pkgs;} { mkVimPlugin config {
inherit name; inherit name;
extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name}); extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name});
}; };

View file

@ -1,13 +1,10 @@
{ {
lib, config,
helpers,
pkgs, pkgs,
... ...
} @ attrs: let }:
helpers = import ../helpers.nix {inherit lib;}; helpers.vim-plugin.mkVimPlugin config {
in
with helpers.vim-plugin;
with lib;
mkVimPlugin attrs {
name = "fugitive"; name = "fugitive";
description = "vim-fugitive"; description = "vim-fugitive";
package = pkgs.vimPlugins.vim-fugitive; package = pkgs.vimPlugins.vim-fugitive;

View file

@ -1,11 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: }:
with lib; with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "ledger"; name = "ledger";
description = "ledger language features"; description = "ledger language features";
package = pkgs.vimPlugins.vim-ledger; package = pkgs.vimPlugins.vim-ledger;

View file

@ -1,12 +1,13 @@
{ {
lib, lib,
pkgs, config,
helpers, helpers,
pkgs,
... ...
} @ args: }:
with lib; with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "markdown-preview"; name = "markdown-preview";
description = "markdown-preview.nvim"; description = "markdown-preview.nvim";
package = pkgs.vimPlugins.markdown-preview-nvim; package = pkgs.vimPlugins.markdown-preview-nvim;

View file

@ -1,13 +1,10 @@
{ {
lib, config,
helpers,
pkgs, pkgs,
... ...
} @ attrs: let }:
helpers = import ../helpers.nix {inherit lib;}; helpers.vim-plugin.mkVimPlugin config {
in
with helpers.vim-plugin;
with lib;
mkVimPlugin attrs {
name = "nix"; name = "nix";
description = "vim-nix"; description = "vim-nix";
package = pkgs.vimPlugins.vim-nix; package = pkgs.vimPlugins.vim-nix;

View file

@ -1,11 +1,10 @@
{ {
lib, helpers,
config,
pkgs, pkgs,
... ...
} @ args: }:
with lib; helpers.vim-plugin.mkVimPlugin config {
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkVimPlugin args {
name = "tagbar"; name = "tagbar";
package = pkgs.vimPlugins.tagbar; package = pkgs.vimPlugins.tagbar;
globalPrefix = "tagbar_"; globalPrefix = "tagbar_";

View file

@ -1,13 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: let }:
helpers = import ../helpers.nix {inherit lib;};
in
with lib; with lib;
with helpers.vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "vim-slime"; name = "vim-slime";
package = pkgs.vimPlugins.vim-slime; package = pkgs.vimPlugins.vim-slime;
globalPrefix = "slime_"; globalPrefix = "slime_";

View file

@ -1,13 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ attrs: let }:
helpers = import ../helpers.nix {inherit lib;};
in
with helpers.vim-plugin;
with lib; with lib;
mkVimPlugin attrs { with helpers.vim-plugin;
mkVimPlugin config {
name = "zig"; name = "zig";
description = "zig.vim"; description = "zig.vim";
package = pkgs.vimPlugins.zig-vim; package = pkgs.vimPlugins.zig-vim;

View file

@ -1,11 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: }:
with lib; with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "airline"; name = "airline";
description = "vim-airline"; description = "vim-airline";
package = pkgs.vimPlugins.vim-airline; package = pkgs.vimPlugins.vim-airline;

View file

@ -1,13 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ attrs: }:
with lib; let with lib;
helpers = import ../helpers.nix {inherit lib;};
in
with helpers.vim-plugin; with helpers.vim-plugin;
mkVimPlugin attrs { mkVimPlugin config {
name = "emmet"; name = "emmet";
package = pkgs.vimPlugins.emmet-vim; package = pkgs.vimPlugins.emmet-vim;
globalPrefix = "user_emmet_"; globalPrefix = "user_emmet_";

View file

@ -1,13 +1,10 @@
{ {
lib, config,
pkgs, pkgs,
helpers,
... ...
} @ attrs: let }:
helpers = import ../helpers.nix {inherit lib;}; helpers.vim-plugin.mkVimPlugin config {
in
with helpers.vim-plugin;
with lib;
mkVimPlugin attrs {
name = "endwise"; name = "endwise";
description = "vim-endwise"; description = "vim-endwise";
package = pkgs.vimPlugins.vim-endwise; package = pkgs.vimPlugins.vim-endwise;

View file

@ -1,13 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ attrs: let }:
helpers = import ../helpers.nix {inherit lib;};
in
with helpers.vim-plugin; with helpers.vim-plugin;
with lib; with lib;
mkVimPlugin attrs { mkVimPlugin config {
name = "goyo"; name = "goyo";
description = "goyo.vim"; description = "goyo.vim";
package = pkgs.vimPlugins.goyo-vim; package = pkgs.vimPlugins.goyo-vim;

View file

@ -1,11 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: }:
with lib; with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "instant"; name = "instant";
description = "instant.nvim"; description = "instant.nvim";
package = pkgs.vimPlugins.instant-nvim; package = pkgs.vimPlugins.instant-nvim;

View file

@ -1,11 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: }:
with lib; with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "magma-nvim"; name = "magma-nvim";
description = "magma-nvim"; description = "magma-nvim";
package = pkgs.vimPlugins.magma-nvim-goose; package = pkgs.vimPlugins.magma-nvim-goose;

View file

@ -1,13 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: let }:
helpers = import ../helpers.nix {inherit lib;};
in
with lib; with lib;
with helpers.vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "molten"; name = "molten";
description = "molten-nvim"; description = "molten-nvim";
package = pkgs.vimPlugins.molten-nvim; package = pkgs.vimPlugins.molten-nvim;

View file

@ -1,13 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: let }:
helpers = import ../helpers.nix {inherit lib;};
in
with lib; with lib;
with helpers.vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "startify"; name = "startify";
package = pkgs.vimPlugins.vim-startify; package = pkgs.vimPlugins.vim-startify;
globalPrefix = "startify_"; globalPrefix = "startify_";

View file

@ -1,13 +1,10 @@
{ {
lib, config,
helpers,
pkgs, pkgs,
... ...
} @ attrs: let }:
helpers = import ../helpers.nix {inherit lib;}; helpers.vim-plugin.mkVimPlugin config {
in
with helpers.vim-plugin;
with lib;
mkVimPlugin attrs {
name = "surround"; name = "surround";
description = "surround.vim"; description = "surround.vim";
package = pkgs.vimPlugins.surround; package = pkgs.vimPlugins.surround;

View file

@ -1,11 +1,13 @@
{ {
lib, lib,
config,
helpers,
pkgs, pkgs,
... ...
} @ args: }:
with lib; with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin; with helpers.vim-plugin;
mkVimPlugin args { mkVimPlugin config {
name = "undotree"; name = "undotree";
package = pkgs.vimPlugins.undotree; package = pkgs.vimPlugins.undotree;
globalPrefix = "undotree_"; globalPrefix = "undotree_";