From 3aa722a3dfcf315c90fc84220374fae2a879dd97 Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Wed, 6 Jul 2022 02:28:14 +0800 Subject: [PATCH] added neovim notify support --- .config/nvim/init.lua | 1 + .config/nvim/lua/user/notify.lua | 16 ++++++++++++++++ .config/nvim/lua/user/plugins.lua | 3 +++ .config/nvim/plugin/packer_compiled.lua | 5 +++++ 4 files changed, 25 insertions(+) create mode 100644 .config/nvim/lua/user/notify.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 09c7efc..585b0d2 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -23,3 +23,4 @@ require("user.colorizer") require("user.discord") require("user.spectre") require("user.dap") +require("user.notify") diff --git a/.config/nvim/lua/user/notify.lua b/.config/nvim/lua/user/notify.lua new file mode 100644 index 0000000..15eec94 --- /dev/null +++ b/.config/nvim/lua/user/notify.lua @@ -0,0 +1,16 @@ +local status_ok, notify = pcall(require, "notify") +if not status_ok then + return +end + +notify.setup({ + stages = "fade_in_slide_out", + on_open = nil, + on_close = nil, + render = "default", + timeout = 175, + background_colour = "Normal", + minimum_width = 10, +}) + +vim.notify = notify diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 88a8db6..231bae9 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -149,6 +149,9 @@ return packer.startup(function(use) -- Spectre use("windwp/nvim-spectre") + -- Notify + use("rcarriga/nvim-notify") + if PACKER_BOOTSTRAP then require("packer").sync() end diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index 9822071..e7764ab 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -224,6 +224,11 @@ _G.packer_plugins = { path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-navic", url = "https://github.com/SmiteshP/nvim-navic" }, + ["nvim-notify"] = { + loaded = true, + path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-notify", + url = "https://github.com/rcarriga/nvim-notify" + }, ["nvim-spectre"] = { loaded = true, path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-spectre",