Skip to content

Commit

Permalink
refactor(lazy): maps.wk API integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKJeff16 committed May 30, 2024
1 parent 2fd6a1d commit 0547c99
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lua/lazy_cfg/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,23 @@ local Keys = {
['<leader>Lr'] = { Lazy.reload, desc('Reload Lazy Plugins') },
},
}
---@type table<MapModes, RegKeysNamed>
local Names = {
n = {
['<leader>L'] = { name = '+Lazy' },
['<leader>Le'] = { name = '+Edit Lazy File' },
},
v = {
['<leader>L'] = { name = '+Lazy' },
['<leader>Le'] = { name = '+Edit Lazy File' },
},
}

for mode, maps in next, Keys do
if WK.available() then
if is_tbl(Names[mode]) and not empty(Names[mode]) then
WK.register(Names[mode], { mode = mode })
end
WK.register(WK.convert_dict(maps), { mode = mode })
else
for lhs, v in next, maps do
Expand Down

0 comments on commit 0547c99

Please sign in to comment.