-
Notifications
You must be signed in to change notification settings - Fork 803
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
Classify nameof<'T>
& match … with nameof ident -> …
correctly
#18300
Conversation
❗ Release notes required
|
nameof<'T>
, match … with nameof ident -> …
, correctlynameof<'T>
& match … with nameof ident -> …
correctly
319500e
to
74eea31
Compare
ca1888b
to
96783dc
Compare
Thanks for this Brian. Will this also cover the cases |
In the result expression of match clauses? It's already colorized correctly there, no? This PR covers (1) generic |
In Rider currently looks like this |
I don't have Rider installed on this machine, but what do other "intrinsic functions" ( What does let f x = nameof x ? FCS classifies
fsharp/src/Compiler/Service/SemanticClassification.fs Lines 157 to 168 in ad29712
The VS integration maps that to its own, separate classification, in the same category as keywords: fsharp/vsintegration/src/FSharp.Editor/Classification/ClassificationDefinitions.fs Line 57 in ad29712
It looks like Rider doesn't use the FCS API here; it must be doing its own classification: https://github.com/search?q=repo%3AJetBrains%2Fresharper-fsharp+SemanticClassificationType&type=code My guess is that this PR will at least make the |
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.
@brianrourkeboll Cool, thanks! Could you look at these two things, please? 🙂
vsintegration/tests/FSharp.Editor.Tests/SemanticClassificationServiceTests.fs
Show resolved
Hide resolved
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.
Nice. Thank you @brianrourkeboll :)
Description
Fixes #10026.
nameof
identifier in type application expressions and patterns to enable correct colorization:nameof
innameof<'T>
.nameof
inmatch … with nameof ident -> …
.Before
After
Checklist