Skip to content

Commit

Permalink
fix(notify): add icon disable support to nvim-notify
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Apr 1, 2024
1 parent d68514c commit fcb833c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions lua/astronvim/plugins/notify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ return {
},
},
init = function() require("astrocore").load_plugin_with_func("nvim-notify", vim, "notify") end,
opts = {
max_height = function() return math.floor(vim.o.lines * 0.75) end,
max_width = function() return math.floor(vim.o.columns * 0.75) end,
on_open = function(win)
opts = function(_, opts)
local get_icon = require("astroui").get_icon
opts.icons = {
DEBUG = get_icon "Debugger",
ERROR = get_icon "DiagnosticError",
INFO = get_icon "DiagnosticInfo",
TRACE = get_icon "DiagnosticHint",
WARN = get_icon "DiagnosticWarn",
}
opts.max_height = function() return math.floor(vim.o.lines * 0.75) end
opts.max_width = function() return math.floor(vim.o.columns * 0.75) end
opts.on_open = function(win)
local astrocore = require "astrocore"
vim.api.nvim_win_set_config(win, { zindex = 175 })
if not astrocore.config.features.notifications then
Expand All @@ -30,7 +38,7 @@ return {
local buf = vim.api.nvim_win_get_buf(win)
if not pcall(vim.treesitter.start, buf, "markdown") then vim.bo[buf].syntax = "markdown" end
vim.wo[win].spell = false
end,
},
end
end,
config = function(...) require "astronvim.plugins.configs.notify"(...) end,
}

0 comments on commit fcb833c

Please sign in to comment.