emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 09f7a92064: Add support for annotation_type_declaration


From: Theodor Thornhill
Subject: emacs-29 09f7a92064: Add support for annotation_type_declaration
Date: Wed, 11 Jan 2023 15:49:50 -0500 (EST)

branch: emacs-29
commit 09f7a920644cc74a1f740454d0c9442eb9b97621
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>

    Add support for annotation_type_declaration
    
    * 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 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index 96d8045bd6..86e753c5f5 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -122,7 +122,8 @@
     "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
@@ -183,7 +184,10 @@
    :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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]