Show notifications on the desktop.
- Linux/BSD (glib2)
- Windows (PowerShell)
- macOS (AppleScript)
The plugin also supports OSC 777, OSC 99, and OSC 9.
{
'ObserverOfTime/notifications.nvim',
opts = {
override_notify = true,
hist_command = 'Notifications',
-- or set `icons = false` to disable all icons
icons = {
TRACE = 'ο', -- 'π',
DEBUG = 'σ° ', -- 'π',
INFO = 'ο', -- 'π£',
WARN = 'οͺ', -- 'β οΈ ',
ERROR = 'ο', -- 'π¨',
OFF = 'ο', -- 'β',
},
hl_groups = {
TRACE = 'DiagnosticFloatingHint',
DEBUG = 'DiagnosticFloatingHint',
INFO = 'DiagnosticFloatingInfo',
WARN = 'DiagnosticFloatingWarn',
ERROR = 'DiagnosticFloatingError',
OFF = 'DiagnosticFloatingOk',
}
},
-- to use OSC 777/99/9:
--[[
config = function(_, opts)
vim.g.notifications_use_osc = '777'
require('notifications').setup(opts)
end
--]]
}
{
'ObserverOfTime/notifications.nvim',
config = function()
-- to use OSC 777/99/9:
-- vim.g.notifications_use_osc = '777'
require('notifications').setup {
...
}
end
}
vim.notify('Hello world', vim.log.levels.INFO, {
icon = 'σ±',
title = 'Test',
critical = true
})
:Notifications