mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
feat(java): add treesit support
This commit is contained in:
parent
6ca155ea11
commit
07e7c699cf
2 changed files with 12 additions and 3 deletions
|
|
@ -30,13 +30,18 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
||||||
(modulep! :tools lsp -eglot))
|
(modulep! :tools lsp -eglot))
|
||||||
(load! "+lsp"))
|
(load! "+lsp"))
|
||||||
|
|
||||||
(when (modulep! +tree-sitter)
|
|
||||||
(add-hook 'java-mode-local-vars-hook #'tree-sitter! 'append))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Common packages
|
;;; 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
|
(use-package! android-mode
|
||||||
:commands android-mode
|
:commands android-mode
|
||||||
:init
|
:init
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@
|
||||||
(modulep! :tools tree-sitter))
|
(modulep! :tools tree-sitter))
|
||||||
"This module requires (: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")
|
(unless (executable-find "javac")
|
||||||
(warn! "Couldn't find the javac executable, are you sure the JDK is installed?"))
|
(warn! "Couldn't find the javac executable, are you sure the JDK is installed?"))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue