From 64271bbb7d9066080ea1e8dbae72beed979350e6 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Mon, 5 Dec 2022 15:59:41 +0100 Subject: [PATCH] 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. --- lisp/progmodes/json-ts-mode.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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))) -- 2.39.2