Skip to content
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

Highlighting of Active Pattern cases #160

Open
NinoFloris opened this issue Aug 3, 2020 · 5 comments
Open

Highlighting of Active Pattern cases #160

NinoFloris opened this issue Aug 3, 2020 · 5 comments

Comments

@NinoFloris
Copy link

Creating a simple active pattern like below, at use sites NullableNone and NullableSome aren't colored like say None and Some cases.

let (|NullableNone|NullableSome|) (v: Nullable<_>) =
     if v.HasValue then NullableSome(v.Value) else NullableNone

let t =
    match Nullable() with
    | NullableNone -> ()
    | NullableSome x -> ()

Testing somewhat more this seems to be the case for all kinds of active patterns, not just multi case patterns. Whether you'd want to color all of them like DU cases is something I'm not sure about.

@auduchinok
Copy link
Member

@NinoFloris Could you share screenshots with both union cases and active patterns using color scheme you use and Rider or ReSharper color scheme?

@En3Tho
Copy link
Contributor

En3Tho commented Aug 31, 2020

@NinoFloris There is an option to colorize Active Patter case as you wish. See below:
image

@auduchinok
Copy link
Member

@NinoFloris Could you share the requested repro, please?

@NinoFloris
Copy link
Author

Whoops, yes it seems it's a color scheme thing (I'm using Visual Studio Dark)

Screenshot 2020-09-02 at 17 44 58

Maybe we could ship a better color by default?

@En3Tho
Copy link
Contributor

En3Tho commented Mar 24, 2022

@auduchinok I believe this should be closed. Not a bug. "Better defaults" is too much of a subjective thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants