mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 14:29:48 +01: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
31 lines
681 B
Nix
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})
|
|
'';
|
|
};
|
|
};
|
|
}
|