mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-27 07:26:46 +00:00
9b48c30e20
* noice: add setupOpts * noice: add filter * noice: use setupOpts * docs: update release notes * noice: allow null option * noice: add descriptions for some options
32 lines
681 B
Nix
32 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})
|
|
'';
|
|
};
|
|
};
|
|
}
|