You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Visually distinguish fixes from non-fixes in lightbulb menu #132109
When invoking the lightbulb menu on an error, the menu can include a mix of both fixes and non-fixes (eg. refactors) mixed together:
It would be good if there was some visual separation or indication of which of these are fixes for the diagnostic and which are not. For example in Android Studio I see the fixes have lightbulbs and non-fixes have pencil/edit icons:
Reacted by Danny Tuppeny, Alexander, Justin Chen, Andreas Olsson and Kroc Camen
Hey I just tried out the new menu in insiders and it looks great!
I was wondering if you would consider adding 2 code action classes that are I think quite common:
refactor.inline (Inline)
refactor.move (Move)
This would be super valuable for the extension that I'm developing (P42 JavaScript Assistant), but I think also for other extensions. Afaik the TS language server also has refactor.move actions for example.
Lars Grammel (@lgrammel) Do you think you can provide examples of inline and move options and what those labels say?
ATM, I know there is a Move to new file code action, and I just have it lumped under More Actions..., but if inline and move are sufficiently different, I'd like to provide them with their own codicons as well!
Justin Chen (@justschen) Here are some examples from "Refactoring, 2nd Edition" (Fowler) that could be relevant for language services from different languages:
Inline:
Inline Class
Inline Function
Inline Variable
Move:
Move Field
Move Function
Move Statement into Function
Move Statements to Callers
I would also consider "Pull Up / Push Down" refactorings to be "move" refactorings, e.g. "Pull Up Field".
Activity
Added Icons and Header Separators to Code Action Widget (ref microsof…
lgrammel commentedon Aug 18, 2022
Hey I just tried out the new menu in insiders and it looks great!
I was wondering if you would consider adding 2 code action classes that are I think quite common:
refactor.inline(Inline)refactor.move(Move)This would be super valuable for the extension that I'm developing (P42 JavaScript Assistant), but I think also for other extensions. Afaik the TS language server also has
refactor.moveactions for example.justschen commentedon Aug 19, 2022
Lars Grammel (@lgrammel) Do you think you can provide examples of inline and move options and what those labels say?
ATM, I know there is a
Move to new filecode action, and I just have it lumped underMore Actions..., but if inline and move are sufficiently different, I'd like to provide them with their own codicons as well!lgrammel commentedon Aug 19, 2022
Justin Chen (@justschen) Here are some examples from "Refactoring, 2nd Edition" (Fowler) that could be relevant for language services from different languages:
Inline:
Move:
I would also consider "Pull Up / Push Down" refactorings to be "move" refactorings, e.g. "Pull Up Field".
P42 has several inline refactorings:
and many move refactorings, e.g.