]> git.eshelyaron.com Git - emacs.git/commitdiff
Add support for annotation_type_declaration
authorTheodor Thornhill <theo@thornhill.no>
Wed, 11 Jan 2023 20:49:04 +0000 (21:49 +0100)
committerTheodor Thornhill <theo@thornhill.no>
Wed, 11 Jan 2023 20:49:04 +0000 (21:49 +0100)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--keywords): Add new
keyword.
(java-ts-mode--font-lock-settings): Add font-locking to the type
feature.

lisp/progmodes/java-ts-mode.el

index 96d8045bd6102b0e0bb4a356a2a153c62d07b42f..86e753c5f53f5e5eb8d1a81f8e117b64f2cbaa56 100644 (file)
     "provides" "public" "requires" "return" "sealed"
     "static" "strictfp" "switch" "synchronized"
     "throw" "throws" "to" "transient" "transitive"
-    "try" "uses" "volatile" "while" "with" "record")
+    "try" "uses" "volatile" "while" "with" "record"
+    "@interface")
   "Java keywords for tree-sitter font-locking.")
 
 (defvar java-ts-mode--operators
    :language 'java
    :override t
    :feature 'type
-   '((interface_declaration
+   '((annotation_type_declaration
+      name: (identifier) @font-lock-type-face)
+
+     (interface_declaration
       name: (identifier) @font-lock-type-face)
 
      (class_declaration