Move off of options for encoding ephemeral state in inline-hints#67367
Move off of options for encoding ephemeral state in inline-hints#67367CyrusNajmabadi merged 5 commits intodotnet:mainfrom
Conversation
| { | ||
| Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(Document document, TextSpan textSpan, InlineHintsOptions options, CancellationToken cancellationToken); | ||
| Task<ImmutableArray<InlineHint>> GetInlineHintsAsync( | ||
| Document document, TextSpan textSpan, InlineHintsOptions options, bool displayAllOverride, CancellationToken cancellationToken); |
There was a problem hiding this comment.
@tmat i could also make this part of InlineHintsOptions. It just wouldn't be populated from any options-service, but would be provided directly by the feature. However, i wasn't certain if that was a pattern we wanted for our immutable-options/options-services in the future. So, for now, i pulled out 'displayAllOverride' as a separate explicit option that is passed along.
If it is fine to move into InlineHintsOptions, i'm happy to move into it. BUt i wanted to check with you.
| var hints = await service.GetInlineHintsAsync( | ||
| document, snapshotSpan.Span.ToTextSpan(), options, | ||
| displayAllOverride: _inlineHintKeyProcessor?.State is true, | ||
| cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
@tmat instead of this, we woudl do a with on the value returned by GlobalOptions.GetInlineHintsOptions(document.Project.Language); and would supply this value there.
There was a problem hiding this comment.
Either way is fine. Whatever feels better for the service API.
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Fixes #57283