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:
parent
861bbdfb1d
commit
96ffa3e660
|
@ -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
|
|
@ -23,6 +23,12 @@ local plugins = {
|
||||||
config = require 'psoxizsh.plugins.config.onedark'
|
config = require 'psoxizsh.plugins.config.onedark'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Pretty vim.notify
|
||||||
|
{ 'rcarriga/nvim-notify',
|
||||||
|
tag = 'v3.*',
|
||||||
|
config = require 'psoxizsh.plugins.config.notify'
|
||||||
|
},
|
||||||
|
|
||||||
-- Text alignment
|
-- Text alignment
|
||||||
{ 'junegunn/vim-easy-align' },
|
{ 'junegunn/vim-easy-align' },
|
||||||
{ 'tmsvg/pear-tree',
|
{ 'tmsvg/pear-tree',
|
||||||
|
|
Loading…
Reference in New Issue