summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-10-27 10:34:14 -0700
committerFranck Cuny <franck@fcuny.net>2024-10-27 10:34:14 -0700
commitc2ad70aadfd86e1a8bbd912dd81f28448fbd1ac4 (patch)
treec18581a84430ad8f8520b5eb89afd762b05539c8
parenttry verdana for variable pitch font (diff)
downloademacs.d-c2ad70aadfd86e1a8bbd912dd81f28448fbd1ac4.tar.gz
add the dape module for debugging
-rw-r--r--config/init-programming.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/init-programming.el b/config/init-programming.el
index 886725d..841a3fc 100644
--- a/config/init-programming.el
+++ b/config/init-programming.el
@@ -84,6 +84,20 @@
   ;; uses https://github.com/nix-community/nixd for the LSP server instead of rnix
   (add-to-list 'eglot-server-programs '(nix-mode . ("nil"))))
 
+(use-package dape
+  :ensure t
+  :hook
+  ((kill-emacs . dape-breakpoint-save) ; Save breakpoints on quit
+   (dape-compile . kill-buffer) ; Kill compile buffer on build success
+   (dape-display-source . pulse-momentary-highlight-one-line) ; Pulse source line (performance hit)
+   (dape-stopped . dape-info) ; To display info and/or repl buffers on stopped
+   (dape-stopped . dape-repl)
+   (dape-start . (lambda () (save-some-buffers t t)))) ; Save buffers on startup, useful for interpreted languages
+  :config
+  (dape-breakpoint-global-mode)
+  (setq dape-buffer-window-arrangement 'gud)
+  (setq dape-inlay-hints t))
+
 ;;; go related configuration
 (use-package go-mode
   :ensure t