mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-04 19:05:55 +00:00
feat(nvim-notify): custom setup opts
This commit is contained in:
parent
64f167e7c5
commit
80fee9dae7
2 changed files with 57 additions and 45 deletions
|
|
@ -5,26 +5,16 @@
|
|||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notify.nvim-notify;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["nvim-notify"];
|
||||
|
||||
luaConfigRC.nvim-notify = 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}",
|
||||
},
|
||||
}
|
||||
require('notify').setup(${toLuaObject cfg.setupOpts})
|
||||
|
||||
-- required to fix offset_encoding errors
|
||||
local notify = vim.notify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue