neovim-flake/modules/plugins/ui/noice/config.nix
Ching Pei Yang 9b48c30e20
Feat noice setup opts (#297)
* noice: add setupOpts

* noice: add filter

* noice: use setupOpts

* docs: update release notes

* noice: allow null option

* noice: add descriptions for some options
2024-07-10 21:02:48 +00:00

31 lines
681 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;
luaConfigRC.noice-nvim = entryAnywhere ''
require("noice").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}