kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
2.98k stars 60 forks source link

Better which-key integration #205

Closed Isrothy closed 1 year ago

Isrothy commented 1 year ago

First of all, thank you for your great plugin!

Checklist

Is your feature request related to a problem? Please describe. If possible, provide a sample buffer/keymap sequence, along with the expected result. no

Describe the solution you'd like A clear and concise description of what you want to happen. After I stroke, for example, ds, whick-key shows suggestions like ( -> delete surrounding (), f -> delete surrounding function, etc.

Additional context Add any other context or screenshots about the feature request here.

kylechui commented 1 year ago

I don't believe that this is possible at the moment, since nvim-surround doesn't actually define a set of keymaps dsf, dsb, etc. Rather, it defines only the ds operator which then takes in some extra character as input. Thus I don't think it would be feasible to have custom descriptions for all of ds(, ds), ... without rewriting the configuration, and I don't think it would be scalable either. Do feel free to chime in if you have some ideas that I'm not aware of that could implement this without incurring significant cost.