nvim/plug: +notify@v3

This is a much prettier frontend for the vim.notify API, which is used
by a lot of plugins to communicate information and/or errors.

Try it out yourself:
  :lua vim.notify('Hello, world!', 'info', { title = 'Testing Notify'})
This commit is contained in:
Paul Stemmet 2022-09-11 17:40:37 +00:00
parent 861bbdfb1d
commit 96ffa3e660
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,21 @@
return function()
local notify, util = require 'notify', require 'psoxizsh.util'
local loaded = _G._psoxizsh_plug_config_notify_loaded
local defaults = {
background_colour = "#000000",
timeout = 2000,
top_down = false,
}
notify.setup(util.mconfig('config.notify', defaults))
-- Set notify as the default Neovim notification service
-- However, weird stuff happens if we set this multiple times
-- so guard against that
if not loaded then
vim.notify = notify
_G._psoxizsh_plug_config_notify_loaded = true
end
end

View File

@ -23,6 +23,12 @@ local plugins = {
config = require 'psoxizsh.plugins.config.onedark'
},
-- Pretty vim.notify
{ 'rcarriga/nvim-notify',
tag = 'v3.*',
config = require 'psoxizsh.plugins.config.notify'
},
-- Text alignment
{ 'junegunn/vim-easy-align' },
{ 'tmsvg/pear-tree',