From ee046010549d37fbffe110b812c5292d0f70d93e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jostein=20Kj=C3=B8nigsen?= Date: Wed, 16 Oct 2024 09:52:08 +0200 Subject: [PATCH] Improve typescript-ts-mode fontification (bug#75824) * lisp/progmodes/typescript-ts-mode.el: (typescript-ts-mode--operators): Add syntax-highlighting ?? operator. (typescript-ts-mode--font-lock-settings): Add "undefined" as recognized constant. (cherry picked from commit a4a0957b6b3b1db858524ac6d4dc3d951f65960b) --- lisp/progmodes/typescript-ts-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 9b2964c5faf..7f81be05221 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -188,7 +188,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." (defvar typescript-ts-mode--operators '("=" "+=" "-=" "*=" "/=" "%=" "**=" "<<=" ">>=" ">>>=" "&=" "^=" - "|=" "&&=" "||=" "??=" "==" "!=" "===" "!==" ">" ">=" "<" "<=" "+" + "|=" "&&=" "||=" "??" "??=" "==" "!=" "===" "!==" ">" ">=" "<" "<=" "+" "-" "*" "/" "%" "++" "--" "**" "&" "|" "^" "~" "<<" ">>" ">>>" "&&" "||" "!" "?.") "TypeScript operators for tree-sitter font-locking.") @@ -271,7 +271,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." :feature 'constant `(((identifier) @font-lock-constant-face (:match "\\`[A-Z_][0-9A-Z_]*\\'" @font-lock-constant-face)) - [(true) (false) (null)] @font-lock-constant-face) + [(true) (false) (null) (undefined)] @font-lock-constant-face) :language language :feature 'keyword -- 2.39.5