diff --git a/home/vim/after/plugin/mappings/telescope.lua b/home/vim/after/plugin/mappings/telescope.lua index 0867b36..e0d38a7 100644 --- a/home/vim/after/plugin/mappings/telescope.lua +++ b/home/vim/after/plugin/mappings/telescope.lua @@ -1,4 +1,5 @@ local wk = require("which-key") +local telescope = require("telescope") local telescope_builtin = require("telescope.builtin") local keys = { @@ -9,6 +10,7 @@ local keys = { F = { telescope_builtin.find_files, "Files" }, g = { telescope_builtin.live_grep, "Grep string" }, G = { telescope_builtin.grep_string, "Grep string under cursor" }, + n = { telescope.extensions.notify.notify, "Notification history" }, }, } diff --git a/home/vim/default.nix b/home/vim/default.nix index 1aad3c1..f7d82e1 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -87,6 +87,8 @@ in # UX improvements dressing-nvim # Integrate native UI hooks with Telescope etc... gitsigns-nvim # Fast git UI integration + nvim-notify # Better notification API + nvim-lsp-notify # LSP event notification, using nvim-notify nvim-surround # Deal with pairs, now in Lua telescope-fzf-native-nvim # Use 'fzf' fuzzy matching algorithm telescope-lsp-handlers-nvim # Use 'telescope' for various LSP actions diff --git a/home/vim/plugin/settings/notify.lua b/home/vim/plugin/settings/notify.lua new file mode 100644 index 0000000..189b4be --- /dev/null +++ b/home/vim/plugin/settings/notify.lua @@ -0,0 +1,17 @@ +local notify = require("notify") +local lsp_notify = require("lsp-notify") + +notify.setup({ + icons = { + DEBUG = "D", + ERROR = "E", + INFO = "I", + TRACE = "T", + WARN = "W", + }, + stages = "slide", +}) + +vim.notify = notify + +lsp_notify.setup({}) diff --git a/home/vim/plugin/settings/telescope.lua b/home/vim/plugin/settings/telescope.lua index 4548ec5..ed8ebc7 100644 --- a/home/vim/plugin/settings/telescope.lua +++ b/home/vim/plugin/settings/telescope.lua @@ -22,3 +22,4 @@ telescope.setup({ telescope.load_extension("fzf") telescope.load_extension("lsp_handlers") +telescope.load_extension("notify")