Add back pair feature in json-ts-mode fontification (bug#59833)

* lisp/progmodes/json-ts-mode.el (json-ts-mode--font-lock-settings):
Add back in removed pair feature.  Also alphabetize features.
(json-ts-mode): Use the new feature.
This commit is contained in:
Theodor Thornhill 2022-12-05 15:59:41 +01:00 committed by Yuan Fu
parent 16b9488842
commit 64271bbb7d
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -93,6 +93,10 @@
:override t
'((escape_sequence) @font-lock-escape-face)
:language 'json
:feature 'pair
:override t ; Needed for overriding string face on keys.
'((pair key: (_) @font-lock-variable-name-face))
:language 'json
:feature 'error
:override t
'((ERROR) @font-lock-warning-face))
@ -156,7 +160,7 @@ the subtrees."
;; Font-lock.
(setq-local treesit-font-lock-settings json-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list
'((constant number string)
'((constant number pair string)
(escape-sequence)
(bracket delimiter error)))