Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable code cleanup in LSP #49056

Merged
merged 1 commit into from
Oct 30, 2020
Merged

Conversation

allisonchou
Copy link
Contributor

Code cleanup currently doesn't work in LSP - tracking issue here: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1094627
We should disable code cleanup for now.

Closes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1193339/

@allisonchou allisonchou added Area-IDE LSP issues related to the roslyn language server protocol implementation labels Oct 29, 2020
@allisonchou allisonchou requested a review from a team as a code owner October 29, 2020 22:18
@allisonchou
Copy link
Contributor Author

allisonchou commented Oct 29, 2020

Note: I wasn't sure whether we would also have to disable code cleanup in the IVsHierarchyCodeCleanupScope case (mainly because I'm unsure exactly what it is) - currently it's just disabled in the text buffer case, which at least seems to fix the original bug.

Copy link
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just skips applying the cleanup, correct? Is there a way we can tell the platform not to show the buttons too? Presumably right now the user can click them and just nothing happens, which is not good.

@allisonchou
Copy link
Contributor Author

allisonchou commented Oct 29, 2020

@davidwengier Hmm, not that I know of, but I could be wrong.
There's also a similar problem here when invoking the code cleanup keyboard shortcut Ctrl+K, Ctrl+E, i.e. nothing would happen. edit: I guess we could possibly give the user an error message, but this would involve the UI thread (I think?).

cc @CyrusNajmabadi, would you happen to know whether there's a way to hide the code cleanup button in this scenario?

@dibarbet
Copy link
Member

@allisonchou see #44409 for hiding the broom. afaik there is not currently a good way.

@allisonchou
Copy link
Contributor Author

@dibarbet Thanks! I left a comment on the original bug asking for the current status of being able to hide unsupported features.
In the meantime, should the CC feature be disabled? I feel like having a button/command that doesn't work is preferable to breaking user code.

@dibarbet
Copy link
Member

I feel like having a button/command that doesn't work is preferable to breaking user code.

Yep, I'm fine with that.

Copy link
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I, also, agree.

@allisonchou allisonchou merged commit 58c086b into dotnet:master Oct 30, 2020
@allisonchou allisonchou deleted the DisableCodeCleanup branch October 30, 2020 05:20
@ghost ghost added this to the Next milestone Oct 30, 2020
@allisonchou allisonchou modified the milestones: Next, 16.9.P2 Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE LSP issues related to the roslyn language server protocol implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants