summaryrefslogtreecommitdiff
path: root/lua/lvim/core/notify.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-10-17 17:29:15 +0200
committerkylo252 <[email protected]>2022-10-17 17:29:15 +0200
commit4ef07315003f723bb8e97d5a91b2bde3773ec1b8 (patch)
treee9889a492f76e3f9573228343aaba647dfd48136 /lua/lvim/core/notify.lua
parente4a5fe97abe500bbbe78fb137d57a59f558da05a (diff)
parent6f6cbc394d2a7e64964b6067a2f42d2e6a07824e (diff)
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to 'lua/lvim/core/notify.lua')
-rw-r--r--lua/lvim/core/notify.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/lua/lvim/core/notify.lua b/lua/lvim/core/notify.lua
index 2db4c4d5..b08c45a6 100644
--- a/lua/lvim/core/notify.lua
+++ b/lua/lvim/core/notify.lua
@@ -3,7 +3,7 @@ local M = {}
local Log = require "lvim.core.log"
local defaults = {
- active = false,
+ active = true,
on_config_done = nil,
opts = {
---@usage Animation style one of { "fade", "slide", "fade_in_slide_out", "static" }
@@ -29,11 +29,11 @@ local defaults = {
---@usage Icons for the different levels
icons = {
- ERROR = "ï™™",
- WARN = "",
- INFO = "ï µ",
- DEBUG = "",
- TRACE = "✎",
+ ERROR = lvim.icons.diagnostics.Error,
+ WARN = lvim.icons.diagnostics.Warning,
+ INFO = lvim.icons.diagnostics.Information,
+ DEBUG = lvim.icons.diagnostics.Debug,
+ TRACE = lvim.icons.diagnostics.Trace,
},
},
}
@@ -43,7 +43,7 @@ function M.config()
defaults.opts.icons = {
ERROR = "[ERROR]",
WARN = "[WARNING]",
- INFO = "[INFo]",
+ INFO = "[INFO]",
DEBUG = "[DEBUG]",
TRACE = "[TRACE]",
}
@@ -58,7 +58,11 @@ function M.setup()
end
local opts = lvim.builtin.notify and lvim.builtin.notify.opts or defaults
- local notify = require "notify"
+
+ local status_ok, notify = pcall(require, "notify")
+ if not status_ok then
+ return
+ end
notify.setup(opts)
vim.notify = notify