Remove C#/VB dependency on inline hints.#48479
Conversation
|
Tagging @cartermp @DanielRosenwasser THis allows experiences like holding down ctrl-alt to see tags like this: Hints can be shown in-situ with text (like You can also just have permanently showing hints. Though we advise that users be able to opt-into/out of that in case they don't like it. |
|
Tagging myself here to add this API to the F# shim. This is neat! |
|
FWIW this is a pretty damn useful feature for F#, we may want to experiment with having it on by default |
TypeScript/JavaScript would have to be careful - semantic highlighting done naively tended to have issues since we only have one fully semantic thread. The key combo is probably more desirable. |
:'( I recommend having interruptible semantic operations that you can yield back on but then resume later. |
THe compiler can stay blue. It would require making the LS async/reenterable. However, i do not see that being that difficult to do. Source: i wrote the original LS :) |
|
Is there a corresponding LSP spec for this? |
Not yet. Primarily because i don't want to preemptively write sucha spec, and then have to change it as we learn about new requirements. For example, when i started, the feature was just about inserting some text at a particular location in the document. But it has already morphed three times:
This is why i'd liek to see how F#/TS/JS want to use this. If you run into changes you'd like we can design through all of that. once we feel like we're in a good place, we coudl then bring this to be an LSP addition :) |
cartermp
left a comment
There was a problem hiding this comment.
Actually if it's not too big a deal @CyrusNajmabadi - if you wanted to just create F# shims for the relevant types and interfaces then that would be great. I imagine this would be the best subfolder: https://github.com/dotnet/roslyn/tree/master/src/Tools/ExternalAccess/FSharp/Editor
Will do once this PR goes in. |
| var taggedText = await _hint.GetDescriptionAsync(document, cancellationToken).ConfigureAwait(false); | ||
| if (!taggedText.IsDefaultOrEmpty) | ||
| { | ||
| var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
all this logic moved in the C#/VB impl of GetDescriptionAsync
|
Hello @CyrusNajmabadi! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |


This is necessary if F# or TS want to add thse sorts of hints to their experience in VS. Note: This is a followup to my previous PRs. It shoudl not be reviewed until that goes in.