mini.clue append to triggers after calling setup function
#871
-
|
Hi there, In my setup, I lazy load all my plugins and some of them are activated using Also, I have set up things in a way that I "append" to my I want to achieve a similar thing with But for me, I want to do things after my Is there a way I can update |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
Hi! This is possible, but not really what 'mini.clue' was designed for. Hence a bit awkward. Currently used config of all modules is available as So modifying triggers is as easy as directly modifying
So all in all, I guess the answer is "yes, but with caveats because 'mini.clue' is not really designed for this use case". I'd advise setting triggers in the single |
Beta Was this translation helpful? Give feedback.
-
|
Hey @echasnovski , a follow-up on this: As a "real world example" of what I'm hoping to achieve is this LazyVim commit, which, ironically, is done for As you can see, some mappings are created dynamically and registered using Following your guidance above, I managed to register some of my existing "groups" in I'm trying to use the for k, v in pairs(i) do
table.insert(MiniClue.config.clues, { mode = 'x', keys = 'i' .. k, desc = v })
table.insert(MiniClue.config.clues, { mode = 'o', keys = 'i' .. k, desc = v })
table.insert(MiniClue.config.clues, { mode = 'x', keys = 'a' .. k, desc = v:gsub(' including.*', '') })
table.insert(MiniClue.config.clues, { mode = 'o', keys = 'a' .. k, desc = v:gsub(' including.*', '') })
endI've also set triggers = {
-- ...
{ mode = 'n', keys = 'v' },
},But, doing something like Which feels like none of my Also, I think Sorry if it became long; tried to show that I'm actually trying things and not asking questions without anything on my side. |
Beta Was this translation helpful? Give feedback.

Hi!
This is possible, but not really what 'mini.clue' was designed for. Hence a bit awkward.
Currently used config of all modules is available as
configfield of module's global variable (as per general principles). So of 'mini.clue' it would beMiniClue.config.So modifying triggers is as easy as directly modifying
MiniClue.config.triggers. But with the following caveats:require('mini.clue').setup(), because it relies on theMiniClueglobal variable.ensure_all_triggers()orensure_buf_triggers(). Th…