Skip to content

Commit

Permalink
lang(json): make field key highlighting consistent with toml and yaml (
Browse files Browse the repository at this point in the history
  • Loading branch information
cotneit authored and Schuyler Mortimer committed Jul 10, 2024
1 parent 4b1b1d2 commit 76f695b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
3 changes: 2 additions & 1 deletion runtime/queries/json/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
] @constant.builtin.boolean
(null) @constant.builtin
(number) @constant.numeric

(pair
key: (_) @keyword)
key: (_) @variable.other.member)

(string) @string
(escape_sequence) @constant.character.escape
Expand Down
23 changes: 16 additions & 7 deletions runtime/queries/json5/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
(string) @string

(identifier) @constant

(number) @constant.numeric

[
(true)
(false)
] @constant.builtin.boolean
(null) @constant.builtin
(number) @constant.numeric

[(true) (false)] @constant.builtin.boolean
(member
name: (_) @variable.other.member)

(string) @string
(comment) @comment

"," @punctuation.delimiter
[
"["
"]"
"{"
"}"
] @punctuation.bracket

0 comments on commit 76f695b

Please sign in to comment.