Comment.nvim icon indicating copy to clipboard operation
Comment.nvim copied to clipboard

Feat request: Add keymap descriptions

Open rafamadriz opened this issue 3 years ago • 3 comments

Giving a description to keymaps would integrate nicely with other plugins like for example which-key.nvim, other benefit is that you can know what exactly a keymap is for when using something like verbose.

With descriptions: Screenshot_20220731_152953

Without descriptions: Screenshot_20220731_153241

As a reference, this was added to kylechui/nvim-surround in this commit https://github.com/kylechui/nvim-surround/commit/306a92830ede75d7d3a48ba04c7e603b73c3f377

rafamadriz avatar Jul 31 '22 18:07 rafamadriz

Sure. This will be a nice addition. PR also welcome :)

numToStr avatar Aug 01 '22 04:08 numToStr

Of course, I'd love to do a PR. Can I get some guidance ? If I understand correctly, I need to work on these two place:

https://github.com/numToStr/Comment.nvim/blob/2e0572cc35ecc117c0ab6dc0aa3132b109d61047/lua/Comment/api.lua#L238-L293

https://github.com/numToStr/Comment.nvim/blob/ef3e6bfa41073a73c298ae90d2796f8ceda71c6a/after/plugin/Comment.lua

rafamadriz avatar Aug 01 '22 23:08 rafamadriz

Yes, these 2 places should work.

numToStr avatar Aug 02 '22 03:08 numToStr