From ab54d7b6efc038e35d9c808ae00a859b5309240b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 10:38:42 +0100 Subject: [PATCH 1/2] WIP: home: vim: notify --- home/vim/after/plugin/mappings/telescope.lua | 2 ++ home/vim/default.nix | 1 + home/vim/plugin/settings/notify.lua | 14 ++++++++++++++ home/vim/plugin/settings/telescope.lua | 1 + 4 files changed, 18 insertions(+) create mode 100644 home/vim/plugin/settings/notify.lua 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..3bd2469 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -87,6 +87,7 @@ in # UX improvements dressing-nvim # Integrate native UI hooks with Telescope etc... gitsigns-nvim # Fast git UI integration + nvim-notify # Better notification API 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..b68c90f --- /dev/null +++ b/home/vim/plugin/settings/notify.lua @@ -0,0 +1,14 @@ +local notify = require("notify") + +notify.setup({ + icons = { + DEBUG = "D", + ERROR = "E", + INFO = "I", + TRACE = "T", + WARN = "W", + }, + stages = "slide", +}) + +vim.notify = notify 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") From 202bdbe698dbe9dad4c27781cda9966d0c4118d1 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 7 Aug 2023 10:51:01 +0000 Subject: [PATCH 2/2] WIP: home: vim: LSP notify --- home/vim/default.nix | 1 + home/vim/plugin/settings/notify.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/home/vim/default.nix b/home/vim/default.nix index 3bd2469..f7d82e1 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -88,6 +88,7 @@ in 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 index b68c90f..189b4be 100644 --- a/home/vim/plugin/settings/notify.lua +++ b/home/vim/plugin/settings/notify.lua @@ -1,4 +1,5 @@ local notify = require("notify") +local lsp_notify = require("lsp-notify") notify.setup({ icons = { @@ -12,3 +13,5 @@ notify.setup({ }) vim.notify = notify + +lsp_notify.setup({})