Skip to content

Commit

Permalink
C# syntax highlight tweaks (helix-editor#4285)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chickenkeeper authored and the-mikedavis committed Oct 16, 2022
1 parent 4281d30 commit 4623cc7
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions runtime/queries/c-sharp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
(comment) @comment

;; Tokens
(type_argument_list ["<" ">"] @punctuation.bracket)
(type_parameter_list ["<" ">"] @punctuation.bracket)

[
";"
"."
Expand Down Expand Up @@ -159,14 +162,7 @@
"??="
] @operator

[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
["(" ")" "[" "]" "{" "}"] @punctuation.bracket

;; Keywords
(modifier) @keyword.storage.modifier
Expand All @@ -175,36 +171,32 @@

[
"as"
"await"
"base"
"catch"
"checked"
"finally"
"from"
"get"
"in"
"init"
"is"
"let"
"lock"
"new"
"operator"
"out"
"params"
"ref"
"select"
"set"
"sizeof"
"stackalloc"
"throw"
"try"
"typeof"
"unchecked"
"using"
"new"
"await"
"in"
"yield"
"get"
"set"
"when"
"out"
"ref"
"from"
"where"
"select"
"init"
"with"
"let"
"yield"
] @keyword

[
Expand All @@ -225,21 +217,31 @@
] @keyword.storage.modifier

[
"break"
"continue"
"goto"
] @keyword.control

[
"catch"
"finally"
"throw"
"try"
] @keyword.control.exception

[
"do"
"for"
"foreach"
"do"
"while"
"break"
"continue"
] @keyword.control.repeat

[
"goto"
"if"
"else"
"switch"
"case"
"default"
"else"
"if"
"switch"
] @keyword.control.conditional

"return" @keyword.control.return
Expand Down

0 comments on commit 4623cc7

Please sign in to comment.