From 0547c99b8175e6956f8eea8e1ab51887a58ca157 Mon Sep 17 00:00:00 2001 From: Guennadi Maximov C Date: Thu, 30 May 2024 12:09:35 -0600 Subject: [PATCH] refactor(lazy): `maps.wk` API integration. --- lua/lazy_cfg/init.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazy_cfg/init.lua b/lua/lazy_cfg/init.lua index 980d462c..c5fa19c4 100644 --- a/lua/lazy_cfg/init.lua +++ b/lua/lazy_cfg/init.lua @@ -888,9 +888,23 @@ local Keys = { ['Lr'] = { Lazy.reload, desc('Reload Lazy Plugins') }, }, } +---@type table +local Names = { + n = { + ['L'] = { name = '+Lazy' }, + ['Le'] = { name = '+Edit Lazy File' }, + }, + v = { + ['L'] = { name = '+Lazy' }, + ['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