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

Port Hover endpoint to cohosting #10839

Closed
DustinCampbell opened this issue Sep 4, 2024 · 0 comments · Fixed by #11150
Closed

Port Hover endpoint to cohosting #10839

DustinCampbell opened this issue Sep 4, 2024 · 0 comments · Fixed by #11150
Assignees
Milestone

Comments

@DustinCampbell
Copy link
Member

DustinCampbell commented Sep 4, 2024

Moving Hover to co-hosting presents a few challenges.

  1. Hover can produce either MarkupContent or, if Visual Studio is the client, a ContainerElement from the Microsoft.VisualStudio.Text.Adornments namespace. For Roslyn, the production of ContainerElement happens in the Editor Features layer, which is not part of Roslyn OOP. So, some re-layering in Roslyn will be necessary.
  2. In multi-targeting scenarios, Hover will add text that describes which targets a tag helper or component is not available in. We'll need an API that can resolve a document file path to the projects that contains it.
  3. The hover infrastructure is leveraged by completion to for completion item tooltips. So, Port Completion endpoints to cohosting #10697 is dependent on work that'll happen as part of this issue.

There's also some related work that I'd like to get try and tackle:

  1. Hover for Razor tag helpers and components has very sketchy code that uses regex's to try and "parse" XML doc comments. We should add a facility to the Razor EA to that parses XML doc comments using Roslyn.
@DustinCampbell DustinCampbell self-assigned this Sep 4, 2024
@phil-allen-msft phil-allen-msft added this to the 17.12 P3 milestone Sep 10, 2024
DustinCampbell added a commit that referenced this issue Nov 6, 2024
Fixes #10839

Now that all of the infrastructure is in place, adding a co-hosting
endpoint and remote service for Hover is mostly boilerplate. Similar to
the signature help endpoint, the result type might be a Roslyn LSP Hover
or a VS LSP Hover. The remote service always returns a Roslyn LSP Hover,
but HTML will return a VS LSP Hover. So, we join the possibilities
together with a SumType.
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 a pull request may close this issue.

2 participants