cmp-buffer icon indicating copy to clipboard operation
cmp-buffer copied to clipboard

Add option to suggest words in different cases

Open vE5li opened this issue 3 years ago • 2 comments

This is a feature I wanted for a long time and after posting my fork on Reddit many people have expressed their interest in having this feature upstream.

The design right now is that you can add this to your options cases = { "snake", "pascal" } to get suggestions of the words in your buffer in those cases. Out of the box I implemented snake case, camel case, pascal case, kebab case, and macro case. Users can also provide functions that take a sequence of strings and return a string to add custom cases.

Here is a screenshot of it working as intended: suggestions_working

I am relatively new to vim plugins so I was unsure about things like error messages and validation. For example, if the user specifies an incorrect case or provides a function that does not return a string there is currently no error message, it will simply not show the suggestion. If that is desirable I can add extra validation in those places.

vE5li avatar Jan 10 '23 01:01 vE5li

@hrsh7th I would really appreciate if you could take a look at this

vE5li avatar Oct 15 '23 09:10 vE5li

@hrsh7th ping

vE5li avatar Jan 18 '24 09:01 vE5li