From: Theodor Thornhill Date: Mon, 5 Dec 2022 14:59:41 +0000 (+0100) Subject: Add back pair feature in json-ts-mode fontification (bug#59833) X-Git-Tag: emacs-29.0.90~1346 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64271bbb7d9;p=emacs.git 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. --- diff --git a/lisp/progmodes/json-ts-mode.el b/lisp/progmodes/json-ts-mode.el index 101e873cf6e..8ea582ad8fa 100644 --- a/lisp/progmodes/json-ts-mode.el +++ b/lisp/progmodes/json-ts-mode.el @@ -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)))