Skip to content

Conversation

@pkazmier
Copy link
Member

Allow arrays to be used to define the modes for clues and triggers.

For example, these two configurations are equivalent:

require("mini.clue").setup({
  clues = { 
    { mode = { "n", "x" }, keys = "<Leader>g", desc = "+Git" },
  },
  triggers = {
    { mode = { "n", "x" }, keys = "<Leader>" },
  },
})
require("mini.clue").setup({
  clues = { 
    { mode = "n", keys = "<Leader>g", desc = "+Git" },
    { mode = "x", keys = "<Leader>g", desc = "+Git" },
  },
  triggers = {
    { mode = "n", keys = "<Leader>" },
    { mode = "x", keys = "<Leader>" },
  },
})

@echasnovski
Copy link
Member

echasnovski commented Dec 31, 2025

Thanks for the PR!

The code looks reasonable. Would you mind also updating the H.is_trigger and H.is_clue helper? On top of tests and documentation, of course :)

@pkazmier pkazmier force-pushed the array-support-for-mode-v3 branch 2 times, most recently from 2170461 to 18348ff Compare January 1, 2026 19:41
@pkazmier pkazmier marked this pull request as ready for review January 1, 2026 20:58
@pkazmier pkazmier marked this pull request as draft January 1, 2026 22:11
@pkazmier pkazmier force-pushed the array-support-for-mode-v3 branch 2 times, most recently from ccf041c to a57a0ad Compare January 2, 2026 04:05
@pkazmier pkazmier marked this pull request as ready for review January 2, 2026 04:06
@pkazmier pkazmier changed the title feat(clue): allow arrays for clue and trigger modes feat(clue): allow list of modes for clues and triggers Jan 2, 2026
@echasnovski echasnovski changed the title feat(clue): allow list of modes for clues and triggers feat(clue): allow mode arrays for clues and triggers Jan 2, 2026
Copy link
Member

@echasnovski echasnovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside of commented nit picks, this looks very clean. Thanks for the attention to details in docs!

Could you also add a 'CHANGELOG.md' entry? Don't forget to mention yourself and this PR similarly to how it was done in the past.

@pkazmier pkazmier force-pushed the array-support-for-mode-v3 branch 5 times, most recently from 6ab6307 to 675e3a9 Compare January 2, 2026 15:29
Resolve nvim-mini#2192

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
@pkazmier pkazmier force-pushed the array-support-for-mode-v3 branch from 675e3a9 to 4246b54 Compare January 2, 2026 15:42
@echasnovski echasnovski changed the base branch from main to backlog January 2, 2026 15:54
Copy link
Member

@echasnovski echasnovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work!

There are very minor nit picks that I'll address in a separate branch.

@echasnovski echasnovski merged commit 50f05bd into nvim-mini:backlog Jan 2, 2026
12 checks passed
@pkazmier pkazmier deleted the array-support-for-mode-v3 branch January 2, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants