mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
helpers/vim-plugin/mkVimPlugin: refactor
This commit is contained in:
parent
66c069c48d
commit
3c174e874c
20 changed files with 739 additions and 744 deletions
|
@ -3,11 +3,7 @@
|
|||
nixvimOptions,
|
||||
}:
|
||||
with lib; {
|
||||
mkVimPlugin = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
mkVimPlugin = config: {
|
||||
name,
|
||||
description ? null,
|
||||
package ? null,
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
with lib; (
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "copilot-vim";
|
||||
description = "copilot.vim";
|
||||
package = pkgs.vimPlugins.copilot-vim;
|
||||
|
@ -39,4 +41,3 @@ with lib; (
|
|||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
|
@ -14,7 +14,7 @@ in
|
|||
useDefaultPackage ? true,
|
||||
...
|
||||
}:
|
||||
mkVimPlugin {inherit lib config pkgs;} {
|
||||
mkVimPlugin config {
|
||||
inherit name;
|
||||
extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name});
|
||||
};
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "fugitive";
|
||||
description = "vim-fugitive";
|
||||
package = pkgs.vimPlugins.vim-fugitive;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "ledger";
|
||||
description = "ledger language features";
|
||||
package = pkgs.vimPlugins.vim-ledger;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "markdown-preview";
|
||||
description = "markdown-preview.nvim";
|
||||
package = pkgs.vimPlugins.markdown-preview-nvim;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "nix";
|
||||
description = "vim-nix";
|
||||
package = pkgs.vimPlugins.vim-nix;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "tagbar";
|
||||
package = pkgs.vimPlugins.tagbar;
|
||||
globalPrefix = "tagbar_";
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin args {
|
||||
mkVimPlugin config {
|
||||
name = "vim-slime";
|
||||
package = pkgs.vimPlugins.vim-slime;
|
||||
globalPrefix = "slime_";
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
}:
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "zig";
|
||||
description = "zig.vim";
|
||||
package = pkgs.vimPlugins.zig-vim;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "airline";
|
||||
description = "vim-airline";
|
||||
package = pkgs.vimPlugins.vim-airline;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs:
|
||||
with lib; let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin attrs {
|
||||
mkVimPlugin config {
|
||||
name = "emmet";
|
||||
package = pkgs.vimPlugins.emmet-vim;
|
||||
globalPrefix = "user_emmet_";
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
helpers,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "endwise";
|
||||
description = "vim-endwise";
|
||||
package = pkgs.vimPlugins.vim-endwise;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
}:
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
mkVimPlugin config {
|
||||
name = "goyo";
|
||||
description = "goyo.vim";
|
||||
package = pkgs.vimPlugins.goyo-vim;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "instant";
|
||||
description = "instant.nvim";
|
||||
package = pkgs.vimPlugins.instant-nvim;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "magma-nvim";
|
||||
description = "magma-nvim";
|
||||
package = pkgs.vimPlugins.magma-nvim-goose;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin args {
|
||||
mkVimPlugin config {
|
||||
name = "molten";
|
||||
description = "molten-nvim";
|
||||
package = pkgs.vimPlugins.molten-nvim;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
}:
|
||||
with lib;
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin args {
|
||||
mkVimPlugin config {
|
||||
name = "startify";
|
||||
package = pkgs.vimPlugins.vim-startify;
|
||||
globalPrefix = "startify_";
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ attrs: let
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with helpers.vim-plugin;
|
||||
with lib;
|
||||
mkVimPlugin attrs {
|
||||
}:
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "surround";
|
||||
description = "surround.vim";
|
||||
package = pkgs.vimPlugins.surround;
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
helpers,
|
||||
pkgs,
|
||||
...
|
||||
} @ args:
|
||||
}:
|
||||
with lib;
|
||||
with (import ../helpers.nix {inherit lib;}).vim-plugin;
|
||||
mkVimPlugin args {
|
||||
with helpers.vim-plugin;
|
||||
mkVimPlugin config {
|
||||
name = "undotree";
|
||||
package = pkgs.vimPlugins.undotree;
|
||||
globalPrefix = "undotree_";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue