;; -*- lexical-binding: t; -*- ;; Default to the Google styleguide formatting for Java (use-package google-c-style :hook (java-mode . google-set-c-style)) (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 "b" 'dap-breakpoint-toggle) (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)