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

Prefer semantic classifications over syntactic ones when both occur at the same location #72746

Merged
merged 13 commits into from
Mar 27, 2024

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 26, 2024
@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review March 27, 2024 02:35
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 27, 2024 02:35
Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the changes seen here, we need to fix the definitions in ClassificationTypeDefinitions.cs. Semantic classifications for identifiers, e.g. UserTypeClassesTypeDefinition, need to have their BaseDefinition set to either Identifier or something derived from Identifier. Otherwise, if you remove Identifier from the classifications here, there will be no way for the system to know how to inherit colors if the semantic classification does not have a customized color set.

During a partial review, all of the references I have seen to PredefinedClassificationTypeNames.FormalLanguage in that file are incorrect, except for possibly the overlay styles (reassigned variables, obsolete, and static symbols).

@CyrusNajmabadi
Copy link
Member Author

In addition to the changes seen here, we need to fix the definitions in ClassificationTypeDefinitions.cs. Semantic classifications for identifiers, e.g. UserTypeClassesTypeDefinition, need to have their BaseDefinition set to either Identifier or something derived from Identifier.

Done.

@CyrusNajmabadi
Copy link
Member Author

@sharwell @ToddGrun ptal :)

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@CyrusNajmabadi CyrusNajmabadi merged commit 380f97f into dotnet:main Mar 27, 2024
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants