neovim-flake/modules/plugins/ui/noice/config.nix
diniamo a0197fe1bb treewide: migrate to pluginRC for correct DAG order
The "new" DAG order is as follows:
- (luaConfigPre)
- globalsScript
- basic
- theme
- pluginConfigs
- extraPluginConfigs
- mappings
- (luaConfigPost)
2024-07-18 10:25:58 +02:00

31 lines
678 B
Nix

{
config,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.lists) optionals;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.ui.noice;
tscfg = config.vim.treesitter;
defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown];
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
"noice-nvim"
"nui-nvim"
];
treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars;
pluginRC.noice-nvim = entryAnywhere ''
require("noice").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}