diff --git a/emacs/init.org b/emacs/init.org index a465987..34fa562 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -1637,7 +1637,33 @@ Emacs support for the Language Server Protocol lsp-ui-sideline-update-mode 'point)) (use-package dap-mode - :after (lsp-mode)) + :after (lsp-mode) + :commands (dap-debug dap-debug-edit-template) + :hook (prog-mode . (lambda () + (dap-mode 1) + (dap-ui-mode 1) + (dap-tooltip-mode 1))) + :init + (defvar dap-commands (make-sparse-keymap)) + (jdormit/define-prefix "cm" "dap") + :config + (require 'dap-python) + :general + (dap-commands + "d" 'dap-debug + "T" 'dap-debug-edit-template + "n" 'dap-next + "i" 'dap-step-in + "o" 'dap-step-out + "c" 'dap-continue + "r" 'dap-restart-frame + "l" 'dap-ui-locals + "h" 'dap-hydra + "b" 'dap-breakpoint-toggle + "B" 'dap-ui-breakpoints-ui-list + "e" 'dap-eval + "x" 'dap-ui-inspect) + (leader-map "cm" dap-commands)) (with-eval-after-load 'lsp-clients (defun lsp-typescript-javascript-tsx-jsx-activate-p (filename major-mode)