diff --git a/emacs/.emacs.d/config/init-java.el b/emacs/.emacs.d/config/init-java.el index a4b091c..fa7a1fd 100644 --- a/emacs/.emacs.d/config/init-java.el +++ b/emacs/.emacs.d/config/init-java.el @@ -5,9 +5,13 @@ :hook (java-mode . google-set-c-style)) (use-package lsp-java - :hook (java-mode . lsp-deferred) :custom - (lsp-java-maven-download-sources t)) + (lsp-java-maven-download-sources t) + (lsp-java-configuration-runtimes '[(:name "JavaSE-11" + :path "/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk" + :default t) + (:name "JavaSE-17" + :path "/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk")])) (defvar java-debug-map (make-sparse-keymap)) (general-def java-mode-map @@ -22,6 +26,7 @@ (setq dap-java-test-additional-args '("-n" "\".*(Test|IT).*\""))) (defun jdormit-java-setup () + (lsp-deferred) (require 'dap-java) (dap-mode))