Browse Source

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

James Walmsley 4 years ago
parent
commit
6bbc082f57
1 changed files with 2 additions and 4 deletions
  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