Skip to content

Conversation

@dkearns
Copy link
Collaborator

@dkearns dkearns commented Jan 5, 2022

This feature seems to predate your work @nickspoons and I'm wondering about its history. Is there something special about class type declarations that I'm overlooking or were the others just not done yet?

The current csClassType implementation doesn't interact all that well with the omnisharp-vim highlighting of types as it still highlights any punctuation chars as csClassType whereas they are usually not highlighted. We could match contained punctuation chars in the various type groups but perhaps it's supposed to be a single region colour to standout.

I'm not sure highlighting these declared types specially like this is worth the trouble in general. I suspect no one has really noticed the special casing of class declarations as types are more uniformly highlighted with OSV and the only difference is the punctuation chars in type parameter lists.

Anyway, this is a quick crack at supporting it for all type declarations (except records).

@nickspoons
Copy link
Owner

Hi @dkearns,

This looks pretty good, nice to make these type declarations consistent. I'm away from the computer for a few more days so haven't seen the results exactly but from the tests it looks very sensible.

Yes the class type declarations were there before I was involved, I suspect that class was just the most common of the type declarations and therefore deemed most important.

@dkearns dkearns force-pushed the highlight-more-type-declarations branch from b7ff809 to b5a64fc Compare January 6, 2022 06:31
@dkearns dkearns force-pushed the highlight-more-type-declarations branch from b5a64fc to 3e1f97e Compare January 6, 2022 13:13
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

Successfully merging this pull request may close these issues.

2 participants