From bd5bfc5f3f942333966f5cc445ea4c49a05af943 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 24 Jan 2023 11:52:50 -0500 Subject: [PATCH] Add java 11 and 17 as options in lsp config --- emacs/.emacs.d/config/init-java.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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))