mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-24 12:23:20 +00:00
ui/noice: lazyload on DeferredUIEnter
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Icbff8af3a0fc527f399530718e2ef7cc6a6a6964
This commit is contained in:
parent
26edb440af
commit
a81aa0f691
2 changed files with 8 additions and 13 deletions
|
|
@ -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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue