From c5de9593e60948a9bc13d40520fb2b02020e5fde Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Fri, 12 May 2023 18:15:01 -0700 Subject: [PATCH] fix notify background --- lua/plugins/colorscheme.lua | 12 +++++++++++- lua/plugins/notify.lua | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/notify.lua diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index d84d78c..69bc808 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,5 +1,15 @@ return { - { "rose-pine/neovim", name = "rose-pine" }, + { + "rose-pine/neovim", + name = "rose-pine", + config = function() + require("rose-pine").setup({ + groups = { + background = "none", + }, + }) + end, + }, -- Configure LazyVim to load rose-pine { diff --git a/lua/plugins/notify.lua b/lua/plugins/notify.lua new file mode 100644 index 0000000..21622e8 --- /dev/null +++ b/lua/plugins/notify.lua @@ -0,0 +1,37 @@ +return { + { + "rcarriga/nvim-notify", + keys = { + { + "un", + function() + require("notify").dismiss({ silent = true, pending = true }) + end, + desc = "Dismiss all Notifications", + }, + }, + opts = { + timeout = 3000, + max_height = function() + return math.floor(vim.o.lines * 0.75) + end, + max_width = function() + return math.floor(vim.o.columns * 0.75) + end, + }, + config = function() + require("notify").setup({ + background_colour = "#191724", + }) + end, + init = function() + -- when noice is not enabled, install notify on VeryLazy + local Util = require("lazyvim.util") + if not Util.has("noice.nvim") then + Util.on_very_lazy(function() + vim.notify = require("notify") + end) + end + end, + }, +}