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

Push hover logic to Workspaces layer #11119

Merged

Conversation

DustinCampbell
Copy link
Member

This change moves all of the logic that computes a VSInternalHover to the Workspaces layer. The file diff shouldn't be too bad, but a lot of code is moved without much additional clean up. So, it might be easier to go commit-by-commit.

IHoverService.GetRazorHoverInfoAsync(...) takes a DocumentPositionInfo and an LSP Position, but it only actually needs one of them.
Rather than passing around ClientCapabilities all the time, use a HoverDisplayOptions record with the relevant information.
Change HoverService to pass around LinePositionSpan throughtout and only create an LSP Range when needed in the end.
Rather than accessing the _projectManager instance field in HoverService, just pass an ISolutionQueryOperations instance throughout.
Moving the existing hover tests requires a few test infrastructure changes.
Now that the implementation of GetHoverAsync has moved to Workspaces, HoverService really doesn't need to carry on.
@DustinCampbell DustinCampbell requested a review from a team as a code owner October 29, 2024 23:30
@DustinCampbell DustinCampbell merged commit 51c7d56 into dotnet:main Oct 30, 2024
12 checks passed
@DustinCampbell DustinCampbell deleted the push-hover-logic-to-workspaces branch October 30, 2024 21:29
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 30, 2024
@jjonescz jjonescz modified the milestones: Next, 17.13 P2 Nov 25, 2024
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.

4 participants