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) (string_literal)

View file

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

View file

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

View file

@ -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"

View file

@ -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

View file

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