Aspnetcore: Razor Directive Attributes don't have documentation

Created on 24 Apr 2020  路  6Comments  路  Source: dotnet/aspnetcore

With LSP preview switch on we get this when hovering:
OnClickDirectiveNoDocumentation
In current LSP preview switch off we get:
OnClickDirectiveWithDocumentation
Let's try to get that documentation back in there.

Done area-razor.tooling enhancement

All 6 comments

With the LSP preview switch off, the document gets treated as C#. As such we get rich C# hover support.

With the LSP preview switch on, we use the WTE hover support which provides us with the hover string as seen due to some other limitations with how VS processes markdown (we can't seem to be passing in markdown for the moment).

We need VS to support markdown for hovers and subsequently, WTE to provide us with markdown data when we request the textDocument/hover endpoint.

@NTaylorMullen should this be moved to the backlog?

@NTaylorMullen should this be moved to the backlog?

I'm not sure quite yet. We're the ones who provide the hover info for the EventCallback<Microsoft.AspNetCore.Components.Web.MouseEventArgs> EventHandlers.onclick. That's typically derived from associated TagHelpers which harvest C# documentation.

Aka, when you hover over @onclick you should see this return data: https://github.com/dotnet/aspnetcore-tooling/blob/d6ab71d1973b98ff29c8cf9e4d0021addaa4b969/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/RazorHoverEndpoint.cs#L98

Problem is that data doesn't look to be capturing the docs for whatever reason.

image

with the LSP preview switch on. I believe this is resolved. @ryanbrandenburg are you still seeing this?

That completion is definitely not coming from the LSP because it gets coloration. Maybe you need to close and re-open your document after turning the switch on?

Tested again on LSP:
image

Was this page helpful?
0 / 5 - 0 ratings