[mini.clue] The proper way to use postkeys and set descriptions for key groups
#2185
-
Contributing guidelines
Module(s)mini.clue QuestionI have my key mappings grouped by prefixes, and with My current config set empty mappings for key group prefixes to give them descriptions: vim.keymap.set("n", "<leader>d", "", { desc = "description for the group" })But it turns out this doesn't work well with {
triggers = {
{mode = "n", keys = "<leader>"}
},
clues = {
{mode = "n", keys = "<leader>dh", postkeys = "<leader>d"}
}
}the empty |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I don't think this is a problem with 'mini.clue'. Having real mappings for both What indeed should work is to have real mappings only for the actions you want to do outside of 'mini.clue' and put a group description in require('mini.clue').setup({
triggers = {
{ mode = 'n', keys = '<leader>' },
},
clues = {
{ mode = 'n', keys = '<leader>d', desc = 'Group' },
{ mode = 'n', keys = '<leader>dh', postkeys = '<leader>d' },
{ mode = 'n', keys = '<leader>dj', postkeys = '<leader>d' },
{ mode = 'n', keys = '<leader>dk', postkeys = '<leader>d' },
{ mode = 'n', keys = '<leader>dl', postkeys = '<leader>d' },
},
})This is more or less documented in "Leader clues" section together with submode example. Although the latter should probably set up |
Beta Was this translation helpful? Give feedback.
I don't think this is a problem with 'mini.clue'. Having real mappings for both
<Leader>dand<Leader>dhis a bit problematic in itself.What indeed should work is to have real mappings only for the actions you want to do outside of 'mini.clue' and put a group description in
config.clues. So something like this: