tooltitude / support

Tooltitude Support
https://www.tooltitude.com
Other
21 stars 0 forks source link

Extract variable shouldn't be applicable if there's only a variable selected #11

Open emil14 opened 1 year ago

emil14 commented 1 year ago

It seems like right now it just always accessible. E.g. this code

x := 42

Would anyway suggest me to extract x to a new variable like

x := 42
newX := x

Doesn't make much sense

tooltitude-support commented 1 year ago

Thanks for you feedback. Our intent was to introduce extract variable for any expression, including trivial ones. What do you think if in case of primary, i.e. the simplest expressions, we show the action only when there's non empty selection?

emil14 commented 1 year ago

I think it should work only if expression selected is not an assignment selection

tooltitude-support commented 1 year ago

@emil14 Ok. Will think about it. I made it work this way since it was done in a similar way in other language service providers.