Add java 11 and 17 as options in lsp config

This commit is contained in:
Jeremy Dormitzer 2023-01-24 11:52:50 -05:00
parent 137e4efea7
commit bd5bfc5f3f

View File

@ -5,9 +5,13 @@
:hook (java-mode . google-set-c-style)) :hook (java-mode . google-set-c-style))
(use-package lsp-java (use-package lsp-java
:hook (java-mode . lsp-deferred)
:custom :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)) (defvar java-debug-map (make-sparse-keymap))
(general-def java-mode-map (general-def java-mode-map
@ -22,6 +26,7 @@
(setq dap-java-test-additional-args '("-n" "\".*(Test|IT).*\""))) (setq dap-java-test-additional-args '("-n" "\".*(Test|IT).*\"")))
(defun jdormit-java-setup () (defun jdormit-java-setup ()
(lsp-deferred)
(require 'dap-java) (require 'dap-java)
(dap-mode)) (dap-mode))