2023-02-06 03:55:19 +03:00
|
|
|
{
|
|
|
|
config,
|
2024-04-23 20:43:41 +03:00
|
|
|
pkgs,
|
2023-02-06 03:55:19 +03:00
|
|
|
lib,
|
|
|
|
...
|
2023-11-06 17:50:27 -07:00
|
|
|
}: let
|
2024-03-16 16:25:30 +03:00
|
|
|
inherit (lib.modules) mkIf;
|
2024-04-23 20:43:41 +03:00
|
|
|
inherit (lib.lists) optionals;
|
2024-07-10 23:02:48 +02:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2024-03-16 16:25:30 +03:00
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2023-11-06 17:50:27 -07:00
|
|
|
|
2023-02-06 03:55:19 +03:00
|
|
|
cfg = config.vim.ui.noice;
|
2024-04-23 20:43:41 +03:00
|
|
|
tscfg = config.vim.treesitter;
|
|
|
|
|
|
|
|
defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown];
|
2023-02-06 03:55:19 +03:00
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
2024-04-23 20:43:41 +03: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 20:43:41 +03:00
|
|
|
'';
|
|
|
|
};
|
2023-02-06 03:55:19 +03:00
|
|
|
};
|
|
|
|
}
|