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