diff --git a/README.org b/README.org index ee38742..22053e7 100644 --- a/README.org +++ b/README.org @@ -30,6 +30,7 @@ - [[#file-extension-mode-association][File Extension Mode Association]] - [[#automatically-revert-buffers-for-changed-files][Automatically Revert Buffers For Changed Files]] - [[#rainbow-mode][Rainbow Mode]] + - [[#debugging][Debugging]] - [[#packagesel][packages.el]] - [[#packages][Packages]] @@ -110,7 +111,7 @@ Alternatively, press =gd= (or =C-c c d=) on a module to browse its directory (fo (evil +everywhere) ; come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness + (format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim multiple-cursors ; editing in many places at once @@ -513,6 +514,50 @@ Revert buffers when the underlying file has changed (global-rainbow-mode 1) #+END_SRC +*** Debugging + +**** Keybindings + +#+BEGIN_SRC emacs-lisp :tangle config.el +(map! :map dap-mode-map + :leader + :prefix ("d" . "dap") + ;; basics + :desc "dap next" "n" #'dap-next + :desc "dap step in" "i" #'dap-step-in + :desc "dap step out" "o" #'dap-step-out + :desc "dap continue" "c" #'dap-continue + :desc "dap hydra" "h" #'dap-hydra + :desc "dap debug restart" "r" #'dap-debug-restart + :desc "dap debug" "s" #'dap-debug + + ;; debug + :prefix ("dd" . "Debug") + :desc "dap debug recent" "r" #'dap-debug-recent + :desc "dap debug last" "l" #'dap-debug-last + + ;; eval + :prefix ("de" . "Eval") + :desc "eval" "e" #'dap-eval + :desc "eval region" "r" #'dap-eval-region + :desc "eval thing at point" "s" #'dap-eval-thing-at-point + :desc "add expression" "a" #'dap-ui-expressions-add + :desc "remove expression" "d" #'dap-ui-expressions-remove + + :prefix ("db" . "Breakpoint") + :desc "dap breakpoint toggle" "b" #'dap-breakpoint-toggle + :desc "dap breakpoint condition" "c" #'dap-breakpoint-condition + :desc "dap breakpoint hit count" "h" #'dap-breakpoint-hit-condition + :desc "dap breakpoint log message" "l" #'dap-breakpoint-log-message) +#+END_SRC + +**** Python + +#+BEGIN_SRC emacs-lisp :tangle config.el +(after! dap-mode + (setq dap-python-debugger 'debugpy)) +#+END_SRC + ** packages.el To install a package with Doom you must declare them here and run =doom sync= on the command line, then restart Emacs for the changes to take effect -- or use =M-x doom/reload=. diff --git a/config.el b/config.el index a59ee2f..73fff0f 100644 --- a/config.el +++ b/config.el @@ -84,3 +84,37 @@ (define-globalized-minor-mode global-rainbow-mode rainbow-mode (lambda () (rainbow-mode 1))) (global-rainbow-mode 1) + +(map! :map dap-mode-map + :leader + :prefix ("d" . "dap") + ;; basics + :desc "dap next" "n" #'dap-next + :desc "dap step in" "i" #'dap-step-in + :desc "dap step out" "o" #'dap-step-out + :desc "dap continue" "c" #'dap-continue + :desc "dap hydra" "h" #'dap-hydra + :desc "dap debug restart" "r" #'dap-debug-restart + :desc "dap debug" "s" #'dap-debug + + ;; debug + :prefix ("dd" . "Debug") + :desc "dap debug recent" "r" #'dap-debug-recent + :desc "dap debug last" "l" #'dap-debug-last + + ;; eval + :prefix ("de" . "Eval") + :desc "eval" "e" #'dap-eval + :desc "eval region" "r" #'dap-eval-region + :desc "eval thing at point" "s" #'dap-eval-thing-at-point + :desc "add expression" "a" #'dap-ui-expressions-add + :desc "remove expression" "d" #'dap-ui-expressions-remove + + :prefix ("db" . "Breakpoint") + :desc "dap breakpoint toggle" "b" #'dap-breakpoint-toggle + :desc "dap breakpoint condition" "c" #'dap-breakpoint-condition + :desc "dap breakpoint hit count" "h" #'dap-breakpoint-hit-condition + :desc "dap breakpoint log message" "l" #'dap-breakpoint-log-message) + +(after! dap-mode + (setq dap-python-debugger 'debugpy)) diff --git a/init.el b/init.el index 24f70eb..f126d65 100644 --- a/init.el +++ b/init.el @@ -42,7 +42,7 @@ (evil +everywhere) ; come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness + (format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim multiple-cursors ; editing in many places at once