From 42529e1c4f55824534184ec0658f0eefb328ac3d Mon Sep 17 00:00:00 2001 From: Xavier Young <45989017+younger-1@users.noreply.github.com> Date: Sun, 15 May 2022 21:59:36 +0800 Subject: fix: load notify's telescope extension properly (#2586) * fix: load notify's telescope extension * fix: add which-key integration for notify --- lua/lvim/core/telescope.lua | 6 ++++++ lua/lvim/core/which-key.lua | 1 + lua/lvim/plugins.lua | 2 -- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/lvim/core/telescope.lua b/lua/lvim/core/telescope.lua index 07dd4b89..6a04a866 100644 --- a/lua/lvim/core/telescope.lua +++ b/lua/lvim/core/telescope.lua @@ -130,6 +130,12 @@ function M.setup() end) end + if lvim.builtin.notify.active then + pcall(function() + require("telescope").load_extension "notify" + end) + end + if lvim.builtin.telescope.on_config_done then lvim.builtin.telescope.on_config_done(telescope) end diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua index be4487f3..b1ae6f87 100644 --- a/lua/lvim/core/which-key.lua +++ b/lua/lvim/core/which-key.lua @@ -234,6 +234,7 @@ M.config = function() }, P = { "edit $LUNARVIM_CACHE_DIR/packer.nvim.log", "Open the Packer logfile" }, }, + n = { "Telescope notify", "View Notifications" }, r = { "LvimReload", "Reload LunarVim's configuration" }, u = { "LvimUpdate", "Update LunarVim" }, }, diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index e0445d58..3055a0a6 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -24,7 +24,6 @@ local core_plugins = { }, { "rcarriga/nvim-notify", - config = function() require("lvim.core.notify").setup() end, @@ -38,7 +37,6 @@ local core_plugins = { -- Telescope { "nvim-telescope/telescope.nvim", - config = function() require("lvim.core.telescope").setup() end, -- cgit v1.2.3