Skip to content

Commit c37031d

Browse files
committed
treewide: luaName -> moduleName
Jus to closer align with its usage.
1 parent a7012e7 commit c37031d

File tree

23 files changed

+31
-31
lines changed

23 files changed

+31
-31
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ A template plugin can be found in (plugins/TEMPLATE.nix)[https://github.com/nix-
7373
| **hasSettings** | Indicating whether the plugin has settings. A `settings` option will be created if true. | No | `true` |
7474
| **imports** | Additional modules to import. | No | `[]` |
7575
| **isColorscheme** | Indicating whether the plugin is a colorscheme. | No | `false` |
76-
| **luaName** | The Lua name for the plugin. | No | `name` parameter |
76+
| **moduleName** | The Lua name for the plugin. | No | `name` parameter |
7777
| **maintainers** | Maintainers for the plugin. | No | `[]` |
7878
| **optionsRenamedToSettings** | Options that have been renamed and move to the `settings` attribute. | No | `[]` |
79-
| **packPathName** | The name of the plugin directory in [packpath](https://neovim.io/doc/user/options.html#'packpath'), usually the plugin's github repo name. E.g. `"foo-bar.nvim"`. | No | `name` parameter |
79+
| **packPathName** | The name of the plugin directory in [packpath](https://neovim.io/doc/user/options.html#'packpath'), usually the plugin's github repo name. E.g. `"foo-bar.nvim"`. | No | `name` parameter |
8080
| **package** | The nixpkgs package attr for this plugin. Can be a string, a list of strings, a module option, or any derivation. For example, "foo-bar-nvim" for `pkgs.vimPlugins.foo-bar-nvim`, or `[ "hello" "world" ]` will be referenced as `pkgs.hello.world`. | No | `name` parameter |
81-
| **settingsDescription** | A description of the settings provided to the `setup` function. | No | `"Options provided to the require('${luaName}')${setup} function."` |
81+
| **settingsDescription** | A description of the settings provided to the `setup` function. | No | `"Options provided to the require('${moduleName}')${setup} function."` |
8282
| **settingsExample** | An example configuration for the plugin's settings. | No | `null` |
8383
| **settingsOptions** | Options representing the plugin's settings. This is optional because `settings` is a "freeform" option. See [Declaring plugin options](#declaring-plugin-options). | No | `{}` |
8484
| **setup** | The setup function for the plugin. | No | `".setup"` |
@@ -135,7 +135,7 @@ Such plugins are usually configured via vim globals, but often have no configura
135135
| **isColorscheme** | Flag to indicate if the plugin is a colorscheme. | No | `false` |
136136
| **maintainers** | The maintainers of the plugin. | No | `[]` |
137137
| **optionsRenamedToSettings** | List of options renamed to settings. | No | `[]` |
138-
| **packPathName** | The name of the plugin directory in [packpath](https://neovim.io/doc/user/options.html#'packpath'), usually the plugin's github repo name. E.g. `"foo-bar.vim"`. | No | `name` parameter |
138+
| **packPathName** | The name of the plugin directory in [packpath](https://neovim.io/doc/user/options.html#'packpath'), usually the plugin's github repo name. E.g. `"foo-bar.vim"`. | No | `name` parameter |
139139
| **package** | The nixpkgs package attr for this plugin. Can be a string, a list of strings, a module option, or any derivation. For example, "foo-bar-vim" for `pkgs.vimPlugins.foo-bar-vim`, or `[ "hello" "world" ]` will be referenced as `pkgs.hello.world`. | No | `name` parameter |
140140
| **settingsExample** | Example settings for the plugin. | No | `null` |
141141
| **settingsOptions** | Options representing the plugin's settings. This is optional because `settings` is a "freeform" option. See [Declaring plugin options](#declaring-plugin-options). | No | `{}` |

lib/neovim-plugin.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
package ? name,
4141
settingsOptions ? { },
4242
settingsExample ? null,
43-
settingsDescription ? "Options provided to the `require('${luaName}')${setup}` function.",
43+
settingsDescription ? "Options provided to the `require('${moduleName}')${setup}` function.",
4444
hasSettings ? true,
4545
extraOptions ? { },
4646
# config
47-
luaName ? name,
47+
moduleName ? name,
4848
setup ? ".setup",
4949
extraConfig ? cfg: { },
5050
extraPlugins ? [ ],
@@ -66,7 +66,7 @@
6666
opts = options.${namespace}.${name};
6767

6868
setupCode = ''
69-
require('${luaName}')${setup}(${
69+
require('${moduleName}')${setup}(${
7070
lib.optionalString (cfg ? settings) (lib.nixvim.toLuaObject cfg.settings)
7171
})
7272
'';

plugins/by-name/better-escape/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ with lib;
77
helpers.neovim-plugin.mkNeovimPlugin {
88
name = "better-escape";
99
packPathName = "better-escape.nvim";
10-
luaName = "better_escape";
10+
moduleName = "better_escape";
1111
package = "better-escape-nvim";
1212

1313
maintainers = [ maintainers.GaetanLepage ];

plugins/by-name/codeium-nvim/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ in
88
lib.nixvim.neovim-plugin.mkNeovimPlugin {
99
name = "codeium-nvim";
1010
packPathName = "codeium.nvim";
11-
luaName = "codeium";
11+
moduleName = "codeium";
1212

1313
maintainers = with lib.maintainers; [
1414
GaetanLepage

plugins/by-name/comment/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ with lib;
77
helpers.neovim-plugin.mkNeovimPlugin {
88
name = "comment";
99
packPathName = "Comment.nvim";
10-
luaName = "Comment";
10+
moduleName = "Comment";
1111
package = "comment-nvim";
1212

1313
maintainers = [ maintainers.GaetanLepage ];

plugins/by-name/conform-nvim/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
in
99
lib.nixvim.neovim-plugin.mkNeovimPlugin {
1010
name = "conform-nvim";
11-
luaName = "conform";
11+
moduleName = "conform";
1212
packPathName = "conform.nvim";
1313

1414
maintainers = [ lib.maintainers.khaneliman ];

plugins/by-name/copilot-chat/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ with lib;
77
helpers.neovim-plugin.mkNeovimPlugin {
88
name = "copilot-chat";
99
packPathName = "CopilotChat.nvim";
10-
luaName = "CopilotChat";
10+
moduleName = "CopilotChat";
1111
package = "CopilotChat-nvim";
1212

1313
maintainers = [ maintainers.GaetanLepage ];

plugins/by-name/indent-blankline/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ with lib;
77
helpers.neovim-plugin.mkNeovimPlugin {
88
name = "indent-blankline";
99
packPathName = "indent-blankline.nvim";
10-
luaName = "ibl";
10+
moduleName = "ibl";
1111
package = "indent-blankline-nvim";
1212

1313
maintainers = [ maintainers.GaetanLepage ];

plugins/by-name/lsp-lines/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
with lib;
77
helpers.neovim-plugin.mkNeovimPlugin {
88
name = "lsp-lines";
9-
luaName = "lsp_lines";
9+
moduleName = "lsp_lines";
1010
packPathName = "lsp_lines.nvim";
1111
package = "lsp_lines-nvim";
1212

plugins/by-name/lsp-signature/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
66
name = "lsp-signature";
77
packPathName = "lsp_signature.nvim";
88
package = "lsp_signature-nvim";
9-
luaName = "lsp_signature";
9+
moduleName = "lsp_signature";
1010

1111
maintainers = [ lib.maintainers.wadsaek ];
1212

plugins/by-name/navic/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ in
55
lib.nixvim.neovim-plugin.mkNeovimPlugin {
66
name = "navic";
77
packPathName = "nvim-navic";
8-
luaName = "nvim-navic";
8+
moduleName = "nvim-navic";
99
package = "nvim-navic";
1010

1111
maintainers = [ lib.maintainers.khaneliman ];

plugins/by-name/none-ls/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
lib.nixvim.neovim-plugin.mkNeovimPlugin {
88
name = "none-ls";
99
packPathName = "none-ls.nvim";
10-
luaName = "null-ls";
10+
moduleName = "null-ls";
1111
package = "none-ls-nvim";
1212

1313
maintainers = [ lib.maintainers.MattSturgeon ];

plugins/by-name/nvim-snippets/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
in
99
lib.nixvim.neovim-plugin.mkNeovimPlugin {
1010
name = "nvim-snippets";
11-
luaName = "snippets";
11+
moduleName = "snippets";
1212

1313
maintainers = [ lib.maintainers.psfloyd ];
1414

plugins/by-name/nvim-ufo/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let
77
in
88
lib.nixvim.neovim-plugin.mkNeovimPlugin {
99
name = "nvim-ufo";
10-
luaName = "ufo";
10+
moduleName = "ufo";
1111
package = "nvim-ufo";
1212

1313
maintainers = [ lib.maintainers.khaneliman ];

plugins/by-name/project-nvim/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ in
99
lib.nixvim.neovim-plugin.mkNeovimPlugin {
1010
name = "project-nvim";
1111
packPathName = "project.nvim";
12-
luaName = "project_nvim";
12+
moduleName = "project_nvim";
1313

1414
maintainers = [ lib.maintainers.khaneliman ];
1515

plugins/by-name/rest/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ in
1111
lib.nixvim.neovim-plugin.mkNeovimPlugin {
1212
name = "rest";
1313
packPathName = "rest.nvim";
14-
luaName = "rest-nvim";
14+
moduleName = "rest-nvim";
1515
package = "rest-nvim";
1616

1717
maintainers = [ lib.maintainers.GaetanLepage ];

plugins/by-name/sqlite-lua/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
lib.nixvim.neovim-plugin.mkNeovimPlugin {
66
name = "sqlite-lua";
77
packPathName = "sqlite.lua";
8-
luaName = "sqlite.lua";
8+
moduleName = "sqlite.lua";
99
package = "sqlite-lua";
1010

1111
maintainers = [ lib.maintainers.khaneliman ];

plugins/by-name/treesitter/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ with lib;
99
helpers.neovim-plugin.mkNeovimPlugin {
1010
name = "treesitter";
1111
packPathName = "nvim-treesitter";
12-
luaName = "nvim-treesitter.configs";
12+
moduleName = "nvim-treesitter.configs";
1313
package = "nvim-treesitter";
1414

1515
description = ''

plugins/by-name/ts-autotag/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ with lib;
88
helpers.neovim-plugin.mkNeovimPlugin {
99
name = "ts-autotag";
1010
packPathName = "nvim-ts-autotag";
11-
luaName = "nvim-ts-autotag";
11+
moduleName = "nvim-ts-autotag";
1212
package = "nvim-ts-autotag";
1313

1414
maintainers = [ maintainers.GaetanLepage ];

plugins/by-name/web-devicons/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ in
55
lib.nixvim.neovim-plugin.mkNeovimPlugin {
66
name = "web-devicons";
77
packPathName = "nvim-web-devicons";
8-
luaName = "nvim-web-devicons";
8+
moduleName = "nvim-web-devicons";
99
package = "nvim-web-devicons";
1010

1111
maintainers = [ lib.maintainers.refaelsh ];

plugins/colorschemes/base16/default.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ let
66
inherit (lib.nixvim) defaultNullOpts toLuaObject;
77

88
name = "base16";
9-
luaName = "base16-colorscheme";
9+
moduleName = "base16-colorscheme";
1010
packPathName = "base16.nvim";
1111
in
1212
lib.nixvim.neovim-plugin.mkNeovimPlugin {
13-
inherit name luaName packPathName;
13+
inherit name moduleName packPathName;
1414
setup = ".with_config";
1515
package = "base16-nvim";
1616
isColorscheme = true;
@@ -145,7 +145,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
145145
`:h nvim-base16-builtin-colorschemes` includes a full list of builtin themes,
146146
however the [plugin's source code] may be more up to date.
147147
148-
You can access `require('${luaName}')` as `base16` in any raw lua,
148+
You can access `require('${moduleName}')` as `base16` in any raw lua,
149149
for example, you could reuse some colors from the builtin colorschemes:
150150
151151
```nix
@@ -181,7 +181,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
181181
# See https://github.com/RRethy/base16-nvim/blob/6ac181b5733518040a33017dde654059cd771b7c/lua/base16-colorscheme.lua#L107-L125
182182
colorschemes.base16.luaConfig.content = ''
183183
do
184-
local base16 = require('${luaName}')
184+
local base16 = require('${moduleName}')
185185
base16.with_config(${toLuaObject cfg.settings})
186186
base16.setup(${toLuaObject cfg.colorscheme})
187187
end

plugins/colorschemes/dracula-nvim.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
lib.nixvim.neovim-plugin.mkNeovimPlugin {
33
name = "dracula-nvim";
44
packPathName = "dracula.nvim ";
5-
luaName = "dracula";
5+
moduleName = "dracula";
66
colorscheme = "dracula";
77
isColorscheme = true;
88

plugins/colorschemes/modus.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let
77
in
88
lib.nixvim.neovim-plugin.mkNeovimPlugin {
99
name = "modus";
10-
luaName = "modus-themes";
10+
moduleName = "modus-themes";
1111
packPathName = "modus-themes.nvim";
1212
package = "modus-themes-nvim";
1313
isColorscheme = true;

0 commit comments

Comments
 (0)