ui/noice: lazyload on DeferredUIEnter

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icbff8af3a0fc527f399530718e2ef7cc6a6a6964
This commit is contained in:
raf 2026-02-14 22:41:10 +03:00
commit a81aa0f691
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 8 additions and 13 deletions

View file

@ -6,8 +6,6 @@
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.lists) optionals; inherit (lib.lists) optionals;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.ui.noice; cfg = config.vim.ui.noice;
tscfg = config.vim.treesitter; tscfg = config.vim.treesitter;
@ -16,16 +14,15 @@
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim = { vim = {
startPlugins = [ startPlugins = ["nui-nvim"];
"noice-nvim"
"nui-nvim"
];
treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars; treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars;
pluginRC.noice-nvim = entryAnywhere '' lazy.plugins.noice-nvim = {
require("noice").setup(${toLuaObject cfg.setupOpts}) package = "noice-nvim";
''; setupModule = "noice";
event = ["DeferredUIEnter"];
inherit (cfg) setupOpts;
};
}; };
}; };
} }

View file

@ -9,9 +9,7 @@
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim = { vim = {
startPlugins = ["nvim-web-devicons"]; lazy.plugins.icon-picker-nvim = {
vim.lazy.plugins.icon-picker-nvim = {
package = "nvim-web-devicons"; package = "nvim-web-devicons";
setupModule = "nvim-web-devicons"; setupModule = "nvim-web-devicons";
event = ["DeferredUIEnter"]; event = ["DeferredUIEnter"];