-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add support for getting debugger data tips through LSP. #76285
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
Conversation
| public class DataTipInfoGetterTests | ||
| public sealed class DataTipInfoGetterTests : AbstractDataTipInfoGetterTests | ||
| { | ||
| private static async Task TestAsync(string markup, string expectedText = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to base type to share with VB.
| <Trait(Traits.Feature, Traits.Features.DebuggingDataTips)> | ||
| Public Class DataTipInfoGetterTests | ||
|
|
||
| Private Shared Async Function TestNoDataTipAsync(input As XElement) As Task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed and replaced with calls to shared base class methods.
| var document = context.GetRequiredDocument(); | ||
|
|
||
| var service = document.GetLanguageService<ILanguageDebugInfoService>(); | ||
| if (service is null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this ever be null? I think I saw a C#/VB/F# implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wasn't certain what our rules were with LSP. like how xaml works there. i wwanted to be a little safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is exported as ExportCSharpVisualBasicStatelessLspService, so it applies only to the main roslyn server (which supports C#,VB, and F#). It won't be called for anything else
src/LanguageServer/Protocol/Protocol/Internal/VSInternalServerCapabilities.cs
Outdated
Show resolved
Hide resolved
src/LanguageServer/Protocol/Protocol/Internal/VSInternalDataTips.cs
Outdated
Show resolved
Hide resolved
src/LanguageServer/ProtocolUnitTests/DataTips/DataTipRangeHandlerTests.cs
Outdated
Show resolved
Hide resolved
src/LanguageServer/ProtocolUnitTests/DataTips/DataTipRangeHandlerTests.cs
Show resolved
Hide resolved
| } | ||
|
|
||
| internal readonly record struct DebugDataTipInfo( | ||
| TextSpan Span, TextSpan ExpressionSpan, string? Text, DebugDataTipInfoKind Kind = DebugDataTipInfoKind.None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That should be the semantics of 'span'.
No description provided.