summaryrefslogtreecommitdiff
path: root/lisp/progmodes/java-ts-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/java-ts-mode.el')
-rw-r--r--lisp/progmodes/java-ts-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index c13cf032c44..215b5c16388 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -281,6 +281,11 @@ Return nil if there is no name or if NODE is not a defun node."
;; Comments.
(c-ts-mode-comment-setup)
+ (setq-local treesit-text-type-regexp
+ (regexp-opt '("line_comment"
+ "block_comment"
+ "text_block")))
+
;; Indent.
(setq-local treesit-simple-indent-rules java-ts-mode--indent-rules)