浏览代码

[WHICH-KEY] Use wk.register() to handle the overrides. (#915)

James Walmsley 4 年之前
父节点
当前提交
6bbc082f57
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      lua/core/which-key.lua

+ 2 - 4
lua/core/which-key.lua

@@ -185,13 +185,11 @@ M.setup = function()
     mappings["z"] = "Zen"
   end
 
-  for k, v in pairs(O.user_which_key) do
-    mappings[k] = v
-  end
-
   local wk = require "which-key"
+
   wk.register(mappings, opts)
   wk.register(vmappings, vopts)
+  wk.register(O.user_which_key, opts)
 end
 
 return M