Przeglądaj źródła

Fix dashboard which key still appears when dashboard disabled (#923)

* Fix dashboard which key still appears when dashboard disabled

* Prevent override user_which_key
hui.liu 4 lat temu
rodzic
commit
64045a40df
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 0
      lua/core/dashboard.lua
  2. 0 1
      lua/core/which-key.lua

+ 2 - 0
lua/core/dashboard.lua

@@ -60,6 +60,8 @@ M.setup = function()
 
   vim.g.dashboard_custom_section = O.plugin.dashboard.custom_section
 
+  O.plugin.which_key.mappings[";"] = { "<cmd>Dashboard<CR>", "Dashboard" }
+
   -- f = {
   --   description = { "  Neovim Config Files" },
   --   command = "Telescope find_files cwd=" .. CONFIG_PATH,

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

@@ -68,7 +68,6 @@ M.config = function()
       ["e"] = { "<cmd>lua require'core.nvimtree'.toggle_tree()<CR>", "Explorer" },
       ["f"] = { "<cmd>Telescope find_files<CR>", "Find File" },
       ["h"] = { '<cmd>let @/=""<CR>', "No Highlight" },
-      [";"] = { "<cmd>Dashboard<CR>", "Dashboard" },
       p = {
         name = "Packer",
         c = { "<cmd>PackerCompile<cr>", "Compile" },