Select what to surround like in "Introduce variable"
A related question about SurroundWith: Is there any way I can give the user the opportunity to surround different expansions of the current caret position? This is already done in "Introduce variable" where you can choose if you want to create a new variable from a subexpression like in the following screenshot

Cheers
Patrick
Please sign in to leave a comment.
Hi Patrick!
Do you mean you want to suggest to extend the scope when user chooses your surround with template?
Anna
Hey Anna,
yes, that was what I had in mind. I guess I don't need this anymore. I implemented a fairly nice logic of selecting the right expression to surround. Nevertheless, would it be easy to implement a feature like this?
Cheers
Patrick
I guess that won't be easy without changing the current api as the api assumes that you returns expressions and not callbacks. And changing the api is tricky as we don't want to break existing plugins.
Thanks,
Anna