Skip to content

Commit

Permalink
helpers/vim-plugin: mkPlugin -> mkVimPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Jan 25, 2024
1 parent 8f90372 commit a68ee73
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ You will then need to add Nix options for all (or most) of the upstream plugin o
These options should be in `camelCase` (whereas most plugins define their options in `snake_case`), and their names should match exactly (except the case) to the upstream names.
There are a number of helpers to help you correctly implement them:
- `helpers.vim-plugin.mkPlugin`: This helper is useful for simple plugins that are configured through (vim) global variables.
- `helpers.vim-plugin.mkVimPlugin`: This helper is useful for simple plugins that are configured through (vim) global variables.
- `helpers.defaultNullOpts.{mkBool,mkInt,mkStr,...}`: This family of helpers takes a default value and a description, and sets the Nix default to `null`. These are the main functions you should use to define options.
- `helpers.defaultNullOpts.mkNullable`: This takes a type, a default and a description. This is useful for more complex options.
- `helpers.nixvimTypes.rawLua`: A type to represent raw lua code. The values are of the form `{ __raw = "<code>";}`. This should not be used if the option can only be raw lua code, `mkLua`/`mkLuaFn` should be used in this case.
Expand Down
2 changes: 1 addition & 1 deletion lib/vim-plugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mkPackageOption,
}:
with lib; {
mkPlugin = {
mkVimPlugin = {
config,
lib,
...
Expand Down
2 changes: 1 addition & 1 deletion plugins/completion/copilot-vim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with lib;
(
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "copilot-vim";
description = "copilot.vim";
package = pkgs.vimPlugins.copilot-vim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/completion/nvim-cmp/cmp-helpers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in
useDefaultPackage ? true,
...
}:
mkPlugin {inherit lib config pkgs;} {
mkVimPlugin {inherit lib config pkgs;} {
inherit name;
extraPlugins = extraPlugins ++ (lists.optional useDefaultPackage pkgs.vimPlugins.${name});
description = "Enable ${name}";
Expand Down
2 changes: 1 addition & 1 deletion plugins/git/fugitive.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with helpers.vim-plugin;
with lib;
mkPlugin attrs {
mkVimPlugin attrs {
name = "fugitive";
description = "Enable vim-fugitive";
package = pkgs.vimPlugins.vim-fugitive;
Expand Down
2 changes: 1 addition & 1 deletion plugins/languages/ledger.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "ledger";
description = "ledger language features";
package = pkgs.vimPlugins.vim-ledger;
Expand Down
2 changes: 1 addition & 1 deletion plugins/languages/markdown-preview.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "markdown-preview";
description = "markdown-preview.nvim";
package = pkgs.vimPlugins.markdown-preview-nvim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/languages/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with helpers.vim-plugin;
with lib;
mkPlugin attrs {
mkVimPlugin attrs {
name = "nix";
description = "Enable nix";
package = pkgs.vimPlugins.vim-nix;
Expand Down
2 changes: 1 addition & 1 deletion plugins/languages/tagbar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "tagbar";
package = pkgs.vimPlugins.tagbar;
globalPrefix = "tagbar_";
Expand Down
2 changes: 1 addition & 1 deletion plugins/languages/vim-slime.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with lib;
with helpers.vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "vim-slime";
package = pkgs.vimPlugins.vim-slime;
globalPrefix = "slime_";
Expand Down
2 changes: 1 addition & 1 deletion plugins/languages/zig.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with helpers.vim-plugin;
with lib;
mkPlugin attrs {
mkVimPlugin attrs {
name = "zig";
description = "Enable zig";
package = pkgs.vimPlugins.zig-vim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/statuslines/airline.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "airline";
description = "vim-airline";
package = pkgs.vimPlugins.vim-airline;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/emmet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ with lib; let
either strInt (attrsOf (either strInt (attrsOf strInt)));
in
with helpers.vim-plugin;
mkPlugin attrs {
mkVimPlugin attrs {
name = "emmet";
description = "Enable emmet";
package = pkgs.vimPlugins.emmet-vim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/endwise.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with helpers.vim-plugin;
with lib;
mkPlugin attrs {
mkVimPlugin attrs {
name = "endwise";
description = "Enable vim-endwise";
package = pkgs.vimPlugins.vim-endwise;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/goyo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with helpers.vim-plugin;
with lib;
mkPlugin attrs {
mkVimPlugin attrs {
name = "goyo";
description = "Enable goyo.vim";
package = pkgs.vimPlugins.goyo-vim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/instant.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "instant";
description = "instant.nvim";
package = pkgs.vimPlugins.instant-nvim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/magma-nvim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "magma-nvim";
description = "magma-nvim";
package = pkgs.vimPlugins.magma-nvim-goose;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/molten.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with lib;
with helpers.vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "molten";
description = "molten-nvim";
package = pkgs.vimPlugins.molten-nvim;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/startify.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with lib;
with helpers.vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "startify";
description = "Enable startify";
package = pkgs.vimPlugins.vim-startify;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/surround.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
in
with helpers.vim-plugin;
with lib;
mkPlugin attrs {
mkVimPlugin attrs {
name = "surround";
description = "Enable surround.vim";
package = pkgs.vimPlugins.surround;
Expand Down
2 changes: 1 addition & 1 deletion plugins/utils/undotree.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} @ args:
with lib;
with (import ../helpers.nix {inherit lib;}).vim-plugin;
mkPlugin args {
mkVimPlugin args {
name = "undotree";
package = pkgs.vimPlugins.undotree;
globalPrefix = "undotree_";
Expand Down

0 comments on commit a68ee73

Please sign in to comment.