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

Add support for InlayHint.TextEdits #5177

Merged
merged 6 commits into from
May 20, 2022

Conversation

JoeRobich
Copy link
Member

@JoeRobich JoeRobich commented Apr 19, 2022

This cannot merge until we take a new release of O# that includes OmniSharp/omnisharp-roslyn#2385.

This PR adds support for InlayHint.TextEdits which allows the hint to be double clicked in VS Code. The TextEdits are then applied to the file removing the need for that particular hint.

Screen.Recording.2022-04-21.at.8.42.47.AM.mov

@JoeRobich JoeRobich force-pushed the add-inlayhint-textedit branch from 186b486 to ed35224 Compare April 19, 2022 04:25
@JoeRobich JoeRobich marked this pull request as ready for review May 20, 2022 16:05
@JoeRobich JoeRobich requested a review from 333fred May 20, 2022 18:37
@333fred
Copy link
Member

333fred commented May 20, 2022

What are the errors in the example gif? Import errors? If so, is there any way we can have the needed imports added to the text edits?

@JoeRobich
Copy link
Member Author

JoeRobich commented May 20, 2022

What are the errors in the example gif? Import errors? If so, is there any way we can have the needed imports added to the text edits?

In hindsight it was a bad idea to use dotnet/format as an example because the .editorconfig requires the use of var. It isn't import related, although now I wonder if I could get that to fail. Worst case the user would have to invoke the 'add import' code fix, but it would be nice for Roslyn to provide all the necessary edits.

@JoeRobich
Copy link
Member Author

@333fred Opened dotnet/roslyn#61438 to track adding imports when necessary.

@JoeRobich JoeRobich merged commit 1cf726f into dotnet:master May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants