From fa0d88249725a884da4e95db633a828719e7d235 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 8 May 2020 14:31:33 -0400 Subject: [PATCH] Fix #3066: void-variable lsp-java-server-install-dir --- modules/lang/java/+lsp.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/lang/java/+lsp.el b/modules/lang/java/+lsp.el index cf41a3c3b..2fbaff0b5 100644 --- a/modules/lang/java/+lsp.el +++ b/modules/lang/java/+lsp.el @@ -6,13 +6,16 @@ :preface (setq lsp-java-workspace-dir (concat doom-etc-dir "java-workspace")) (add-hook 'java-mode-local-vars-hook #'lsp!) + (map! :when (featurep! :tools debugger +lsp) + :after cc-mode ; where `java-mode' is defined + :map java-mode-map + :localleader + (:prefix ("t" . "Test") + :desc "Run test class or method" "t" #'+java/run-test + :desc "Run all tests in class" "a" #'dap-java-run-test-class + :desc "Debug test class or method" "d" #'+java/debug-test + :desc "Debug all tests in class" "D" #'dap-java-debug-test-class)) + :config (when (featurep! :tools debugger +lsp) (setq lsp-jt-root (concat lsp-java-server-install-dir "java-test/server/") - dap-java-test-runner (concat lsp-java-server-install-dir "test-runner/junit-platform-console-standalone.jar")) - (map! :map java-mode-map - :localleader - (:prefix ("t" . "Test") - :desc "Run test class or method" "t" #'+java/run-test - :desc "Run all tests in class" "a" #'dap-java-run-test-class - :desc "Debug test class or method" "d" #'+java/debug-test - :desc "Debug all tests in class" "D" #'dap-java-debug-test-class)))) + dap-java-test-runner (concat lsp-java-server-install-dir "test-runner/junit-platform-console-standalone.jar"))))