Set up realgud

This commit is contained in:
Jeremy Dormitzer 2020-04-16 18:12:23 -04:00
parent 995f3d3af2
commit 2b3088c84a

View File

@ -2221,15 +2221,13 @@ nice with Org-roam:
(leader-def-key "ps" #'projectile-run-shell-command-in-root)
(leader-def-key "pa" #'projectile-run-async-shell-command-in-root)
(leader-def-key "p M-x" #'projectile-run-command-in-root)
(defun projectile-pdb ()
(interactive)
(with-temp-buffer
(when (projectile-project-root)
(cd (projectile-project-root)))
(let ((command-line (gud-query-cmdline 'pdb)))
(pdb command-line))))
(jdormit/define-prefix "pd" "debug")
(leader-def-key "pdp" #'projectile-pdb))
(jdormit/define-prefix "pd" "debug"))
(defmacro with-projectile-root (&rest body)
`(with-temp-buffer
(when (projectile-project-root)
(cd (projectile-project-root)))
,@body))
#+END_SRC
* Mode line
@ -5790,6 +5788,18 @@ to use instead:
(leader-def-key "cg" #'hydra-gud/body)
#+END_SRC
* realgud
Like [[info:emacs#Debuggers][GUD]], but better!
#+BEGIN_SRC emacs-lisp
(use-package realgud
:init
(defun projectile-pdb ()
(interactive)
(with-projectile-root
(funcall-interactively #'realgud:pdb)))
(leader-def-key "pdp" #'projectile-pdb))
#+END_SRC
* EDiff
#+BEGIN_SRC emacs-lisp
(setq ediff-window-setup-function #'ediff-setup-windows-plain)