Improve fontification of typescript-ts-mode (bug#59831)
- Highlight property and field definitions in class declaration. - Highlight property-keys in object initializaters. - Highlight variable-names in function/method return-statements. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Add fontification rules.
This commit is contained in:
parent
64271bbb7d
commit
318bf42b41
1 changed files with 16 additions and 2 deletions
|
@ -213,7 +213,14 @@ Argument LANGUAGE is either `typescript' or `tsx'."
|
|||
parameters:
|
||||
[(_ (identifier) @font-lock-variable-name-face)
|
||||
(_ (_ (identifier) @font-lock-variable-name-face))
|
||||
(_ (_ (_ (identifier) @font-lock-variable-name-face)))]))
|
||||
(_ (_ (_ (identifier) @font-lock-variable-name-face)))])
|
||||
|
||||
(return_statement (identifier) @font-lock-variable-name-face)
|
||||
|
||||
(binary_expression left: (identifier) @font-lock-variable-name-face)
|
||||
(binary_expression right: (identifier) @font-lock-variable-name-face)
|
||||
|
||||
(arguments (identifier) @font-lock-variable-name-face))
|
||||
|
||||
:language language
|
||||
:override t
|
||||
|
@ -282,7 +289,14 @@ Argument LANGUAGE is either `typescript' or `tsx'."
|
|||
:language language
|
||||
:override t
|
||||
:feature 'property
|
||||
`((pair value: (identifier) @font-lock-variable-name-face)
|
||||
`((property_signature
|
||||
name: (property_identifier) @font-lock-property-face)
|
||||
(public_field_definition
|
||||
name: (property_identifier) @font-lock-property-face)
|
||||
|
||||
(pair key: (property_identifier) @font-lock-variable-name-face)
|
||||
|
||||
(pair value: (identifier) @font-lock-variable-name-face)
|
||||
|
||||
((shorthand_property_identifier) @font-lock-property-face)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue