Move around java-ts-mode font-lock rules (bug#75154)
* lisp/progmodes/java-ts-mode.el: (java-ts-mode--font-lock-settings): Move constant feature down so it overrides expression and definition.
This commit is contained in:
parent
93cd55f40e
commit
3d2d95e284
1 changed files with 7 additions and 6 deletions
|
@ -236,11 +236,6 @@ For NODE, OVERRIDE, START, and END, see `treesit-font-lock-rules'."
|
|||
(block_comment) @font-lock-comment-face)
|
||||
:language 'java
|
||||
:override t
|
||||
:feature 'constant
|
||||
`((identifier) @java-ts-mode--fontify-constant
|
||||
[(true) (false)] @font-lock-constant-face)
|
||||
:language 'java
|
||||
:override t
|
||||
:feature 'keyword
|
||||
`([,@java-ts-mode--keywords
|
||||
(this)
|
||||
|
@ -346,7 +341,13 @@ For NODE, OVERRIDE, START, and END, see `treesit-font-lock-rules'."
|
|||
(argument_list (identifier) @font-lock-variable-name-face)
|
||||
|
||||
(expression_statement (identifier) @font-lock-variable-use-face))
|
||||
|
||||
;; Make sure the constant feature is after expression and definition,
|
||||
;; because those two applies variable-name-face on some constants.
|
||||
:language 'java
|
||||
:override t
|
||||
:feature 'constant
|
||||
`((identifier) @java-ts-mode--fontify-constant
|
||||
[(true) (false)] @font-lock-constant-face)
|
||||
:language 'java
|
||||
:feature 'bracket
|
||||
'((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
|
||||
|
|
Loading…
Add table
Reference in a new issue