mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-27 14:23:43 -05:00
feat(java): add treesit support
This commit is contained in:
@@ -30,13 +30,18 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
||||
(modulep! :tools lsp -eglot))
|
||||
(load! "+lsp"))
|
||||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'java-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
|
||||
;;
|
||||
;;; Common packages
|
||||
|
||||
(use-package! java-ts-mode
|
||||
:when (modulep! +tree-sitter)
|
||||
:when (fboundp 'java-ts-mode) ; 29.1+ only
|
||||
:defer t
|
||||
:init
|
||||
(set-tree-sitter! 'java-mode 'java-ts-mode '(java doxygen)))
|
||||
|
||||
|
||||
(use-package! android-mode
|
||||
:commands android-mode
|
||||
:init
|
||||
|
@@ -9,6 +9,10 @@
|
||||
(modulep! :tools tree-sitter))
|
||||
"This module requires (:tools tree-sitter)")
|
||||
|
||||
(assert! (or (not (modulep! +tree-sitter))
|
||||
(fboundp 'java-ts-mode))
|
||||
"Can't find `java-ts-mode'; Emacs 29.1+ is required")
|
||||
|
||||
(unless (executable-find "javac")
|
||||
(warn! "Couldn't find the javac executable, are you sure the JDK is installed?"))
|
||||
|
||||
|
Reference in New Issue
Block a user