summary refs log tree commit diff
path: root/.vim/lua/globals.lua
diff options
context:
space:
mode:
Diffstat (limited to '.vim/lua/globals.lua')
-rw-r--r--.vim/lua/globals.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/.vim/lua/globals.lua b/.vim/lua/globals.lua
index 6b2f004..5492b73 100644
--- a/.vim/lua/globals.lua
+++ b/.vim/lua/globals.lua
@@ -12,3 +12,11 @@ _G.augroup = function(tbl)
     end
   end
 end
+
+_G.wk_register = function(mappings, opts)
+  local wk = package.loaded['which-key']
+  -- local _, wk = pcall(require, 'which-key')
+  if wk then return wk.register(mappings, opts) end
+  vim.notify_once('which-key missing')
+end
+