diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh index 1d4076564dc..3c4e1472c89 100755 --- a/admin/notes/tree-sitter/build-module/batch.sh +++ b/admin/notes/tree-sitter/build-module/batch.sh @@ -13,6 +13,7 @@ languages=( 'go-mod' 'heex' 'html' + 'java' 'javascript' 'json' 'python' diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index 863adeb9245..99d34789dcc 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -356,7 +356,7 @@ Return nil if there is no name or if NODE is not a defun node." (setq-local treesit-defun-name-function #'java-ts-mode--defun-name) (setq-local treesit-thing-settings - `(java + `((java (sexp ,(rx (or "annotation" "parenthesized_expression" "argument_list" @@ -378,7 +378,7 @@ Return nil if there is no name or if NODE is not a defun node." "import_declaration"))) (text ,(regexp-opt '("line_comment" "block_comment" - "text_block"))))) + "text_block")))))) ;; Font-lock. (setq-local treesit-font-lock-settings java-ts-mode--font-lock-settings)