瀏覽代碼

fix: load notify's telescope extension properly (#2586)

* fix: load notify's telescope extension

* fix: add which-key integration for notify
Xavier Young 3 年之前
父節點
當前提交
42529e1c4f
共有 3 個文件被更改,包括 7 次插入2 次删除
  1. 6 0
      lua/lvim/core/telescope.lua
  2. 1 0
      lua/lvim/core/which-key.lua
  3. 0 2
      lua/lvim/plugins.lua

+ 6 - 0
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

+ 1 - 0
lua/lvim/core/which-key.lua

@@ -234,6 +234,7 @@ M.config = function()
           },
           P = { "<cmd>edit $LUNARVIM_CACHE_DIR/packer.nvim.log<cr>", "Open the Packer logfile" },
         },
+        n = { "<cmd>Telescope notify<cr>", "View Notifications" },
         r = { "<cmd>LvimReload<cr>", "Reload LunarVim's configuration" },
         u = { "<cmd>LvimUpdate<cr>", "Update LunarVim" },
       },

+ 0 - 2
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,