Is your feature request related to a problem? Please describe.
Description is always a fixed string. In some cases, it's useful to see context-related info in the description. For example:
Display "Jump to README.md" instead of "Jump to buffer 1"
Display "Toggle conceal (set 2)" instead of "Toggle conceal"
Display "Replace word 'Category'` instead of "Replace current word"
Display "Find Files in ~/projects/abc" instead of "Find Files (Root Dir)"
Display "Insert July 14 2024" instead of "Insert current date"
Display "Format injected markdown block" instead of "Format injected language"
Display "Format with rustfmt" instead of "Format"
...etc
Describe the solution you'd like
The keymap description is dynamically calculated, and the result may be based on context (current buffer id, current window id)
Describe alternatives you've considered
I understand that API requires description as text in the mappings. I wonder if the feature looks feasible and if you see the potential in the dynamic descriptions in the which-key
Mini.clue plugin has a concept of generators. Maybe in which-key it's also possible to support some generators, where the description will be recalculated on every opening
Did you check the docs?
Is your feature request related to a problem? Please describe.
Description is always a fixed string. In some cases, it's useful to see context-related info in the description. For example:
Describe the solution you'd like
The keymap description is dynamically calculated, and the result may be based on context (current buffer id, current window id)
Describe alternatives you've considered
I understand that API requires description as text in the mappings. I wonder if the feature looks feasible and if you see the potential in the dynamic descriptions in the which-key
Mini.clue plugin has a concept of generators. Maybe in which-key it's also possible to support some generators, where the description will be recalculated on every opening
Additional context
Nvim 0.10.0 LazyVim 12.28.0 Which-key https://github.com/folke/which-key.nvim/commit/05bd8701dd5d7e90b2f5c4ae05f9471641400bed