2023-02-06 00:55:19 +00:00
|
|
|
{
|
|
|
|
config,
|
2024-04-23 17:43:41 +00:00
|
|
|
pkgs,
|
2023-02-06 00:55:19 +00:00
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 00:50:27 +00:00
|
|
|
}: let
|
2024-03-16 13:25:30 +00:00
|
|
|
inherit (lib.modules) mkIf;
|
2024-04-23 17:43:41 +00:00
|
|
|
inherit (lib.lists) optionals;
|
2024-07-10 21:02:48 +00:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2024-03-16 13:25:30 +00:00
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2023-11-07 00:50:27 +00:00
|
|
|
|
2023-02-06 00:55:19 +00:00
|
|
|
cfg = config.vim.ui.noice;
|
2024-04-23 17:43:41 +00:00
|
|
|
tscfg = config.vim.treesitter;
|
|
|
|
|
|
|
|
defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown];
|
2023-02-06 00:55:19 +00:00
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
2024-04-23 17:43:41 +00:00
|
|
|
vim = {
|
|
|
|
startPlugins = [
|
|
|
|
"noice-nvim"
|
|
|
|
"nui-nvim"
|
|
|
|
];
|
|
|
|
|
|
|
|
treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars;
|
|
|
|
|
|
|
|
luaConfigRC.noice-nvim = entryAnywhere ''
|
2024-07-10 21:02:48 +00:00
|
|
|
require("noice").setup(${toLuaObject cfg.setupOpts})
|
2024-04-23 17:43:41 +00:00
|
|
|
'';
|
|
|
|
};
|
2023-02-06 00:55:19 +00:00
|
|
|
};
|
|
|
|
}
|