-
Notifications
You must be signed in to change notification settings - Fork 759
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
Fixed UDT syntax highlighting #14372
Conversation
Test this change out locally with the following install scripts (Action run 9590262619) VSCode
Azure CLI
|
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!
private static SemanticTokenType GetSemanticTokenForPotentialTypeSymbol(Symbol? symbol) => | ||
symbol switch | ||
{ | ||
PropertySymbol property => GetSemanticTokenForPotentialTypeSymbol(property.Type), |
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.
Will this end up highlighting an imported variable (accessed as a property on a wildcard import) as a type? E.g.,
mod.bicep
@export()
var foo = 'foo'
main.bicep
import * as mod from 'mod.bicep'
output foo string = mod.foo
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.
Fixed the recent regression in syntax highlighting for user defined types:
SemanticTokenType.Namespace
for namespace symbols.SemanticTokenType.Type
forTypeVariableAccessSyntax
that resolves to a valid type symbol.SemanticTokenType.Keyword
fornull
,true
andfalse
type keywords.Examples of changes:
I will look into adding tests separately since we don't currently have baselines or meaningful unit tests for syntax highlighting. (I recall we had some issues with that in the past, but will need to confirm.)
This fixes #14147
Microsoft Reviewers: Open in CodeFlow