smoka7 / multicursors.nvim

A multi cursor plugin for Neovim.
MIT License
492 stars 15 forks source link

feat(hints): allow functions in generate_hints #58

Closed MariaSolOs closed 1 year ago

MariaSolOs commented 1 year ago

(Sorry for the PR bombardment hehe)

For a more flexible customization of hints, this PR adds a function variant of generate_hints[mode] that takes as input the Hydra heads and should return a string.

Also piggy-backing what seems to be a bug. In the code below we're trying to access description from HeadOpts, but there's no such field. My educated guess is that desc was meant to be used here instead. https://github.com/smoka7/multicursors.nvim/blob/c75d0f2594f8faa766682afecd4a6d6fa26b3974/lua/multicursors/layers.lua#L33-L35