1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix fontification for var in java-ts-mode (bug#79626)

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--font-lock-settings): Add font-lock rule for "var".
This commit is contained in:
Yuan Fu 2025-11-02 14:03:33 -08:00
parent 0175b7209e
commit 68290e1a03
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -315,6 +315,12 @@ function is called. Subsequent calls return the first evaluated value."
(:match "\\`[A-Z]" @font-lock-type-face))
(type_identifier) @font-lock-type-face
;; In Java, var is not a keyword but rather a auto-determined type.
;; But we want to fontify it as a keyword. (The override query is
;; below the general query because :override flag is set for this
;; rule.)
((type_identifier) @font-lock-keyword-face
(:match "\\`var\\'" @font-lock-keyword-face))
[(boolean_type)
(integral_type)