diff --git a/lua/lazy_cfg/telescope/init.lua b/lua/lazy_cfg/telescope/init.lua index e6c938de..f29287d1 100644 --- a/lua/lazy_cfg/telescope/init.lua +++ b/lua/lazy_cfg/telescope/init.lua @@ -95,6 +95,15 @@ local Maps = { }, } +---@type table +local Names = { + n = { + ['fT'] = { name = '+Telescope' }, + ['fTb'] = { name = '+Builtins' }, + ['fTe'] = { name = '+Extensions' }, + }, +} + ---@type table local known_exts = { ['scope'] = { 'scope' }, @@ -133,18 +142,18 @@ local known_exts = { ['noice'] = { 'noice', ---@type fun(): KeyMapDict - keys = exists('noice') and function() + keys = function() local Noice = require('noice') ---@type KeyMapDict local res = { - ['nl'] = { + ['fTenl'] = { function() Noice.cmd('last') end, desc('NoiceLast'), }, - ['nh'] = { + ['fTenh'] = { function() Noice.cmd('history') end, @@ -152,6 +161,10 @@ local known_exts = { }, } + if is_tbl(Names['n']) then + Names['n']['fTen'] = { name = '+Noice' } + end + return res end, }, @@ -176,15 +189,6 @@ for mod, ext in next, known_exts do ::continue:: end ----@type table -local Names = { - n = { - ['fT'] = { name = '+Telescope' }, - ['fTb'] = { name = '+Builtins' }, - ['fTe'] = { name = '+Extensions' }, - }, -} - for mode, t in next, Maps do if WK.available() then if is_tbl(Names[mode]) and not empty(Names[mode]) then