Highlight punctuation uniformly in all supported languages
Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
6658fa58c0
commit
f0c6a6ad18
6 changed files with 46 additions and 10 deletions
|
@ -56,7 +56,16 @@
|
||||||
[
|
[
|
||||||
"."
|
"."
|
||||||
";"
|
";"
|
||||||
] @delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
[
|
[
|
||||||
(string_literal)
|
(string_literal)
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
"?."
|
"?."
|
||||||
"."
|
"."
|
||||||
","
|
","
|
||||||
|
":"
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -11,4 +11,11 @@
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
(null)
|
(null)
|
||||||
] @constant
|
] @constant
|
||||||
|
|
||||||
|
[
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
|
@ -34,6 +34,20 @@
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
(_
|
||||||
|
.
|
||||||
|
"<" @punctuation.bracket
|
||||||
|
">" @punctuation.bracket)
|
||||||
|
|
||||||
[
|
[
|
||||||
"as"
|
"as"
|
||||||
"async"
|
"async"
|
||||||
|
|
|
@ -20,14 +20,18 @@
|
||||||
; Punctuation
|
; Punctuation
|
||||||
;------------
|
;------------
|
||||||
|
|
||||||
"." @punctuation.delimiter
|
[
|
||||||
"," @punctuation.delimiter
|
"."
|
||||||
|
","
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
"=" @operator
|
"=" @operator
|
||||||
|
|
||||||
"[" @punctuation.bracket
|
[
|
||||||
"]" @punctuation.bracket
|
"["
|
||||||
"[[" @punctuation.bracket
|
"]"
|
||||||
"]]" @punctuation.bracket
|
"[["
|
||||||
"{" @punctuation.bracket
|
"]]"
|
||||||
"}" @punctuation.bracket
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
"?."
|
"?."
|
||||||
"."
|
"."
|
||||||
","
|
","
|
||||||
|
":"
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue