Initial support for forward/backward-sentence movement with
tree-sitter. Include all statements, and some declarations. Don't
include the bigger declarations we don't want to jump over too big
blocks of code.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Add relevant node
types to treesit-sentence-type-regexp.
"module_declaration")))
(setq-local treesit-defun-name-function #'java-ts-mode--defun-name)
+ (setq-local treesit-sentence-type-regexp
+ (regexp-opt '("statement"
+ "local_variable_declaration"
+ "field_declaration"
+ "module_declaration"
+ "package_declaration"
+ "import_declaration")))
+
;; Font-lock.
(setq-local treesit-font-lock-settings java-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list