Configure dap-mode debugging for Java
This commit is contained in:
parent
667ed940ef
commit
344ab6b686
@ -62,6 +62,13 @@
|
||||
:custom
|
||||
(lsp-ui-doc-show-with-cursor t))
|
||||
|
||||
;; Integrated debugger
|
||||
(use-package dap-mode
|
||||
:commands (dap-debug dap-debug-edit-template dap-mode)
|
||||
:config
|
||||
(add-hook 'dap-stopped-hook
|
||||
(lambda (arg) (call-interactively #'dap-hydra))))
|
||||
|
||||
;; Some compilation-mode conveniences
|
||||
(use-package compile
|
||||
:straight (:type built-in)
|
||||
|
@ -7,6 +7,23 @@
|
||||
(use-package lsp-java
|
||||
:hook (java-mode . lsp-deferred))
|
||||
|
||||
(defvar java-debug-map (make-sparse-keymap))
|
||||
(general-def java-mode-map
|
||||
"C-c d" '(:keymap java-debug-map :which-key "debug"))
|
||||
(general-def java-debug-map
|
||||
"d" 'dap-java-debug
|
||||
"t" 'dap-java-debug-test-method
|
||||
"c" 'dap-java-debug-test-class)
|
||||
|
||||
(with-eval-after-load 'dap-java
|
||||
(setq dap-java-test-additional-args '("-n" "\".*(Test|IT).*\"")))
|
||||
|
||||
(defun jdormit-java-setup ()
|
||||
(require 'dap-java)
|
||||
(dap-mode))
|
||||
|
||||
(add-hook 'java-mode-hook 'jdormit-java-setup)
|
||||
|
||||
(use-package protobuf-mode)
|
||||
|
||||
(provide 'init-java)
|
||||
|
Loading…
Reference in New Issue
Block a user