From 8e56077d946786be6bcb72384616c45de2ccbd43 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Mar 2022 10:38:42 +0100 Subject: [PATCH] WIP: home: vim: notify --- home/vim/after/plugin/mappings/telescope.vim | 2 ++ home/vim/default.nix | 1 + home/vim/plugin/settings/notify.vim | 9 +++++++++ home/vim/plugin/settings/telescope.vim | 1 + 4 files changed, 13 insertions(+) create mode 100644 home/vim/plugin/settings/notify.vim diff --git a/home/vim/after/plugin/mappings/telescope.vim b/home/vim/after/plugin/mappings/telescope.vim index eb6363d..98551f9 100644 --- a/home/vim/after/plugin/mappings/telescope.vim +++ b/home/vim/after/plugin/mappings/telescope.vim @@ -1,5 +1,6 @@ lua << EOF local wk = require("which-key") +local telescope = require("telescope") local telescope_builtin = require("telescope.builtin") local keys = { @@ -10,6 +11,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 22268d3..4bd1886 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -82,6 +82,7 @@ in # UX improvements dressing-nvim # Integrate native UI hooks with Telescope etc... gitsigns-nvim # Fast git UI integration + nvim-notify # Better notification API telescope-fzf-native-nvim # Use 'fzf' fuzzy matching algorithm telescope-lsp-handlers-nvim # Use 'telescope' for various LSP actions telescope-nvim # Fuzzy finder interface diff --git a/home/vim/plugin/settings/notify.vim b/home/vim/plugin/settings/notify.vim new file mode 100644 index 0000000..d60927f --- /dev/null +++ b/home/vim/plugin/settings/notify.vim @@ -0,0 +1,9 @@ +lua << EOF +local notify = require("notify") + +notify.setup({ + stages = "slide", +}) + +vim.notify = notify +EOF diff --git a/home/vim/plugin/settings/telescope.vim b/home/vim/plugin/settings/telescope.vim index 4731b39..084aeb4 100644 --- a/home/vim/plugin/settings/telescope.vim +++ b/home/vim/plugin/settings/telescope.vim @@ -14,4 +14,5 @@ telescope.setup({ telescope.load_extension("fzf") telescope.load_extension("lsp_handlers") +telescope.load_extension("notify") EOF