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
Refactor does not appear on editor context menu when using LSP #2885
@bsutton is it just the Refactor entry from this menu that's missing, or do they also not show up in the lightbulb?
I can repro them showing up in lightbulb, but no refactor menu here. If you're not seeing them in the lightbulb either, that's likely a different issue.
I'll see if I can figure out what triggers the Refactor menu to appear (and whether it's changed in VS Code recently, which might explain it disappearing).
I hadn't thought about checking the quick fix menu.
And yes all of the expected refactoring operations are available under the
quick fix menu.
It does however look like we have a secondary issue in that renaming an
library doesn't refactor the import statements. I will raise a separate
issue.
On Mon, 19 Oct 2020 at 22:36, Danny Tuppeny ***@***.***> wrote:
@bsutton <https://github.com/bsutton> is it just the Refactor entry from
this menu that's missing, or do they also not show up in the lightbulb?
I can repro them showing up in lightbulb, but no refactor menu here. If
you're not seeing them in the lightbulb either, that's likely a different
issue.
I'll see if I can figure out what triggers the Refactor menu to appear
(and whether it's changed in VS Code recently, which might explain it
disappearing).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2885 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OAIGPA7HK6RHFLFWXLSLQQD3ANCNFSM4SVMI6OA>
.
Activity
DanTup commentedon Oct 19, 2020
@bsutton is it just the Refactor entry from this menu that's missing, or do they also not show up in the lightbulb?
I can repro them showing up in lightbulb, but no refactor menu here. If you're not seeing them in the lightbulb either, that's likely a different issue.
I'll see if I can figure out what triggers the Refactor menu to appear (and whether it's changed in VS Code recently, which might explain it disappearing).
bsutton commentedon Oct 19, 2020
DanTup commentedon Oct 26, 2020
This seems to be LSP-related. For non-LSP, our refactor provider provides metadata to VS Code to tell it we have refactors:
https://github.com/Dart-Code/Dart-Code/blob/master/src/extension/providers/refactor_code_action_provider.ts#L21-L23
However in LSP we don't have this - seems like we need to provide them in the
ServerCapabilities.[-]refactor menu gone.[/-][+]Refactor does not appear on editor context menu when using LSP[/+]DanTup commentedon Oct 26, 2020
Fixed by https://dart-review.googlesource.com/c/sdk/+/169102, though it may take time to show up as it's in the SDK and will need to roll into Flutter etc.
[Analyzer] Advertise that LSP server can provide Refactor CodeActions