p42ai / js-assistant

120+ refactorings and code-assists for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=p42ai.refactor
MIT License
119 stars 7 forks source link

To Arrow Anchor Point #51

Closed hediet closed 1 year ago

hediet commented 1 year ago

image

Wasn't the "Remove {...} from arrow function" action suggested here once?

lgrammel commented 1 year ago

Thanks, I'll take a look!

lgrammel commented 1 year ago

It is available as a regular code action (convert), but not as a quickfix at that position. Were you expecting a quickfix (I could increase the quickfix range)?

hediet commented 1 year ago

Yep, was expecting a quick fix there

lgrammel commented 1 year ago

Cool, will change it in the next update. Btw, if you want to add/remove braces even faster, you can try the toggle braces shortcut (Ctrl + Alt + B on Windows).

hediet commented 1 year ago

I already use quite a few shortcuts and would be happy if I could remember the one for organize imports...

lgrammel commented 1 year ago

I have trouble with that one as well for some reason.

"Remove braces from arrow function" is available as quick fix on the "return" keyword starting with v1.147.1 - thanks for the suggestion!