Highlight punctuation uniformly in all supported languages

Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-04-22 12:16:49 -07:00
parent 6658fa58c0
commit f0c6a6ad18
6 changed files with 46 additions and 10 deletions

View file

@ -56,7 +56,16 @@
[
"."
";"
] @delimiter
] @punctuation.delimiter
[
"{"
"}"
"("
")"
"["
"]"
] @punctuation.bracket
[
(string_literal)

View file

@ -86,6 +86,7 @@
"?."
"."
","
":"
] @punctuation.delimiter
[

View file

@ -11,4 +11,11 @@
(true)
(false)
(null)
] @constant
] @constant
[
"{"
"}"
"["
"]"
] @punctuation.bracket

View file

@ -34,6 +34,20 @@
((identifier) @constant
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
[
"("
")"
"{"
"}"
"["
"]"
] @punctuation.bracket
(_
.
"<" @punctuation.bracket
">" @punctuation.bracket)
[
"as"
"async"

View file

@ -20,14 +20,18 @@
; Punctuation
;------------
"." @punctuation.delimiter
"," @punctuation.delimiter
[
"."
","
] @punctuation.delimiter
"=" @operator
"[" @punctuation.bracket
"]" @punctuation.bracket
"[[" @punctuation.bracket
"]]" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket
[
"["
"]"
"[["
"]]"
"{"
"}"
] @punctuation.bracket

View file

@ -86,6 +86,7 @@
"?."
"."
","
":"
] @punctuation.delimiter
[