Skip to content

Commit

Permalink
More detailed scopes in typescript.scm
Browse files Browse the repository at this point in the history
Part of #210475
  • Loading branch information
alexr00 committed Sep 6, 2024
1 parent d0d802e commit 786cc48
Showing 1 changed file with 51 additions and 27 deletions.
78 changes: 51 additions & 27 deletions src/vs/editor/common/languages/highlights/typescript.scm
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@

; Keywords

("typeof") @keyword.operator.expression.typeof

[
"delete"
"in"
"infer"
"instanceof"
"keyof"
"of"
"typeof"
] @keyword.operator.expression

[
Expand Down Expand Up @@ -91,7 +92,7 @@

[
"void"
] @support.type
] @support.type.primitive

[
"new"
Expand All @@ -108,56 +109,79 @@
"?"
] @punctuation.delimiter

[
"!"
"~"
"==="
"!=="
"&&"
"||"
"??"
] @keyword.operator.logical

[
"-"
"--"
"-="
"+"
"++"
"+="
"*"
"*="
"**"
"**="
"/"
"/="
"%"
"%="
"^"
] @keyword.operator.arithmetic

(binary_expression ([
"<"
"<="
">"
">="
]) @keyword.operator.relational)

[
"="
] @keyword.operator.assignment

(augmented_assignment_expression ([
"-="
"+="
"*="
"/="
"%="
"^="
"&="
"|="
"&&="
"||="
"??="
]) @keyword.operator.assignment.compound)

[
"++"
] @keyword.operator.increment

[
"--"
] @keyword.operator.decrement

[
"**"
"**="
"<<"
"<<="
"="
"=="
"==="
"!"
"!="
"!=="
"=>"
">"
">="
">>"
">>="
">>>"
">>>="
"~"
"^"
"&"
"|"
"^="
"&="
"|="
"&&"
"||"
"??"
"&&="
"||="
"??="
] @keyword.operator

; Special identifiers

(type_identifier) @entity.name.type
(predefined_type (["string" "boolean" "number"])) @support.type.primitive
(predefined_type) @support.type

(("const")
Expand Down

0 comments on commit 786cc48

Please sign in to comment.