diff options
Diffstat (limited to 'lua/mason-core/notify.lua')
| -rw-r--r-- | lua/mason-core/notify.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/mason-core/notify.lua b/lua/mason-core/notify.lua new file mode 100644 index 00000000..b41c7e64 --- /dev/null +++ b/lua/mason-core/notify.lua @@ -0,0 +1,13 @@ +local TITLE = "mason.nvim" + +return function(msg, level) + local has_notify_plugin = pcall(require, "notify") + level = level or vim.log.levels.INFO + if has_notify_plugin then + vim.notify(msg, level, { + title = TITLE, + }) + else + vim.notify(("[%s] %s"):format(TITLE, msg), level) + end +end |
