Modules/Neovim: Fix lua module/plugin path name mismatch
This commit is contained in:
@ -308,6 +308,15 @@ in {
|
|||||||
require("${name}").setup(opts)
|
require("${name}").setup(opts)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Like mkDefaultConfig but takes the Lua module name explicitly.
|
||||||
|
# Use when the Lua module name (e.g. "noice") differs from what
|
||||||
|
# lazy.nvim expects as the plugin name (e.g. "noice.nvim").
|
||||||
|
mkDefaultConfigFor = moduleName: ''
|
||||||
|
function(_, opts)
|
||||||
|
require("${moduleName}").setup(opts)
|
||||||
|
end
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -1378,19 +1387,19 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_nui = {
|
_nui = {
|
||||||
name = "nui"; # For noice
|
name = "nui.nvim";
|
||||||
pkg = pkgs.vimPlugins.nui-nvim;
|
pkg = pkgs.vimPlugins.nui-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
noice = rec {
|
noice = rec {
|
||||||
name = "noice";
|
name = "noice.nvim";
|
||||||
pkg = pkgs.vimPlugins.noice-nvim;
|
pkg = pkgs.vimPlugins.noice-nvim;
|
||||||
lazy = false;
|
lazy = false;
|
||||||
dependencies = [
|
dependencies = [
|
||||||
_nui
|
_nui
|
||||||
];
|
];
|
||||||
config = mkDefaultConfig name;
|
config = mkDefaultConfigFor "noice";
|
||||||
opts = {
|
opts = {
|
||||||
presets = {
|
presets = {
|
||||||
bottom_search = false;
|
bottom_search = false;
|
||||||
@ -1812,7 +1821,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_plenary = {
|
_plenary = {
|
||||||
name = "plenary";
|
name = "plenary.nvim";
|
||||||
pkg = pkgs.vimPlugins.plenary-nvim;
|
pkg = pkgs.vimPlugins.plenary-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
};
|
};
|
||||||
@ -2231,12 +2240,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
yazi = rec {
|
yazi = rec {
|
||||||
name = "yazi";
|
name = "yazi.nvim";
|
||||||
pkg = pkgs.vimPlugins.yazi-nvim;
|
pkg = pkgs.vimPlugins.yazi-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
event = ["VeryLazy"];
|
event = ["VeryLazy"];
|
||||||
dependencies = [_plenary];
|
dependencies = [_plenary];
|
||||||
config = mkDefaultConfig name;
|
config = mkDefaultConfigFor "yazi";
|
||||||
opts = {
|
opts = {
|
||||||
open_for_directories = true;
|
open_for_directories = true;
|
||||||
highlight_hovered_buffers_in_same_directory = false;
|
highlight_hovered_buffers_in_same_directory = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user