summaryrefslogtreecommitdiffstats
path: root/after/plugin/notify.lua
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-10-22 18:17:21 -0400
committerSquibid <me@zacharyscheiman.com>2023-10-22 18:17:21 -0400
commit01729e261340a4462a57bf80f6e591c1371ae996 (patch)
tree67b6488d097ac04cb5d27d794b530ee15ce65593 /after/plugin/notify.lua
parente522d7d3faa895c2722113b316d4fc8203158996 (diff)
downloadnvim-01729e261340a4462a57bf80f6e591c1371ae996.tar.gz
nvim-01729e261340a4462a57bf80f6e591c1371ae996.tar.bz2
nvim-01729e261340a4462a57bf80f6e591c1371ae996.zip
kitchen sink:
- add code action previews - change indent blankline style - more luasnip snippets - change default mason stuff - customize neorg more - change notify style - change startpage completely - add line info to statusline - change telescope style - change how todo comments look - make indentation work via treesitter
Diffstat (limited to 'after/plugin/notify.lua')
-rw-r--r--after/plugin/notify.lua20
1 files changed, 18 insertions, 2 deletions
diff --git a/after/plugin/notify.lua b/after/plugin/notify.lua
index 1a3d1e9..36d7885 100644
--- a/after/plugin/notify.lua
+++ b/after/plugin/notify.lua
@@ -4,6 +4,8 @@ if not status_ok then
end
notify.setup {
+ timeout = 3000,
+ minimum_width = 35,
icons = {
DEBUG = "B",
ERROR = "x",
@@ -11,6 +13,20 @@ notify.setup {
TRACE = "t",
WARN = "!"
},
- minimum_width = 35,
- max_width = 80,
+
+ max_height = function() return math.floor(vim.o.lines * 0.75) end,
+ max_width = function() return math.floor(vim.o.columns * 0.5) end,
+ on_open = function(win, record)
+ vim.api.nvim_win_set_config(win, {
+ title = {
+ { " "..record.title[1].." ", "Notify"..record.level.."Title" },
+ },
+ title_pos = "center",
+ border = "single",
+ })
+ end,
+ render = function(bufnr, notif)
+ notif.message[1] = string.format("%s", notif.message[1])
+ vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, notif.message)
+ end,
}