aboutsummaryrefslogtreecommitdiff
path: root/lua/cmake-explorer/notification.lua
diff options
context:
space:
mode:
authorDaniil Rozanov <daniilrozzanov@gmail.com>2024-03-18 01:49:23 +0300
committerDaniil Rozanov <daniilrozzanov@gmail.com>2024-03-18 01:49:23 +0300
commit6184ca819279c7e44f470a731fcca3d469f40a01 (patch)
tree4f51162ca534935c2cbbf404c08ea1c51359340b /lua/cmake-explorer/notification.lua
parentd36594025727d32b6580f188a4c0476aaeecfd77 (diff)
feat: new CMakeConfigureLast and CMakeConfigureDir commands. CMakeConfigure and CMakeConfigureDir now have vim.ui.* interface to edit
Diffstat (limited to 'lua/cmake-explorer/notification.lua')
-rw-r--r--lua/cmake-explorer/notification.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/cmake-explorer/notification.lua b/lua/cmake-explorer/notification.lua
new file mode 100644
index 0000000..fa8ff6e
--- /dev/null
+++ b/lua/cmake-explorer/notification.lua
@@ -0,0 +1,13 @@
+local has_notify, notify = pcall(require, "notify")
+
+local Notification = {}
+
+function Notification.notify(msg, lvl, opts)
+ opts = opts or {}
+ if has_notify then
+ opts.hide_from_history = true
+ return notify(msg, lvl, opts)
+ end
+end
+
+return Notification