mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-10 12:21:40 +00:00
feat: apply new module format to notification plugins
This commit is contained in:
parent
d93b005f2c
commit
4d1e7bcbe6
5 changed files with 83 additions and 35 deletions
31
modules/notifications/nvim-notify/config.nix
Normal file
31
modules/notifications/nvim-notify/config.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notify.nvim-notify;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-notify"];
|
||||
|
||||
vim.luaConfigRC.nvim-notify = nvim.dag.entryAnywhere ''
|
||||
require('notify').setup {
|
||||
stages = "${cfg.stages}",
|
||||
timeout = ${toString cfg.timeout},
|
||||
background_colour = "${cfg.background_colour}",
|
||||
position = "${cfg.position}",
|
||||
icons = {
|
||||
ERROR = "${cfg.icons.ERROR}",
|
||||
WARN = "${cfg.icons.WARN}",
|
||||
INFO = "${cfg.icons.INFO}",
|
||||
DEBUG = "${cfg.icons.DEBUG}",
|
||||
TRACE = "${cfg.icons.TRACE}",
|
||||
},
|
||||
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue