Closed David-Else closed 4 years ago
Hi @David-Else 👋
Thank you for pushing this. This is what I call "Improvements". A typical scenario that Abracadabra could recognize to apply an existing refactoring.
This one can be frequent when we use guard clauses indeed. I'll definitely love to implement this one 👍
I'll keep you posted.
I know this is not a great bit of logic in my code, but this is just an example, I am having a go at refactoring an old app :)
You can do this! That's exactly in such situations I'd be glad to help you with the extension 😄
Cheers!
Sorry to go off topic, but I just saw this new feature in the new VSCode 1.41 release that is about to come out this week and thought it might help this extension?
https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions
That's very interesting.
From what I understand, that will allow the user to configure personal shortcuts for actions that are only available through Code Actions (= Quick Fixes). So you will be able to set a shortcut to trigger "Convert If/Else to Ternary" for example.
From the extension standpoint though, I don't see how we could use that. Maybe Abracadabra could leverage it to make VS Code native "extract function" triggers with a shortcut. I'll have a look.
Again, thanks for sharing 👍
I am not sure if this is a bug or a feature request. As soon as I started using this plugin I am finding immediately many cases like this:
abracadabra does not seem to recognise this as an ideal chance to convert to a ternary, and there is no lighbulb or option to convert. It would be great if it did see this opportunity and output:
I know this is not a great bit of logic in my code, but this is just an example, I am having a go at refactoring an old app :) Cheers!