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.
This commit is contained in:
parent
3a7809f9cc
commit
a4a0957b6b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue