Add projectile-pdb (and fix formatting)

This commit is contained in:
Jeremy Dormitzer 2020-03-09 16:30:48 -04:00
parent d09b6f97cc
commit 5ab2f60ee2

View File

@ -2130,9 +2130,13 @@ nice with Org-roam:
* Projectile
#+BEGIN_SRC emacs-lisp
(use-package projectile :commands (projectile-find-file
projectile-grep projectile-switch-project projectile-project-root)
:init (defhydra hydra-projectile (:color teal :hint nil) "
(use-package projectile
:commands (projectile-find-file
projectile-grep
projectile-switch-project
projectile-project-root)
:init
(defhydra hydra-projectile (:color teal :hint nil) "
PROJECTILE: %(projectile-project-root)
Find File Search/Tags Buffers Cache
@ -2143,28 +2147,50 @@ nice with Org-roam:
cleanup non-existing _r_: recent file ^^^^_z_: cache current _d_:
dir
" ("a" projectile-ag) ("b" projectile-switch-to-buffer) ("c"
projectile-invalidate-cache) ("d" projectile-find-dir) ("s-f"
projectile-find-file) ("ff" projectile-find-file-dwim) ("fd"
projectile-find-file-in-directory) ("g" ggtags-update-tags)
("s-g" ggtags-update-tags) ("i" projectile-ibuffer) ("K"
projectile-kill-buffers) ("s-k" projectile-kill-buffers) ("m"
projectile-multi-occur) ("o" projectile-multi-occur) ("s-p"
projectile-switch-project "switch project") ("p"
projectile-switch-project) ("s" projectile-switch-project) ("r"
projectile-recentf) ("x" projectile-remove-known-project) ("X"
projectile-cleanup-known-projects) ("z"
projectile-cache-current-file) ("`"
hydra-projectile-other-window/body "other window") ("q" nil
"cancel" :color blue)) :config (projectile-mode)
(jdormit/define-prefix "p" "projectile") (leader-def-key "pf"
#'projectile-find-file) (leader-def-key "pg" #'projectile-grep)
(leader-def-key "pp" #'projectile-switch-project)
(leader-def-key "pc" #'projectile-compile-project)
(leader-def-key "ph" #'hydra-projectile/body) (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))
"
("a" projectile-ag)
("b" projectile-switch-to-buffer)
("c" projectile-invalidate-cache)
("d" projectile-find-dir)
("s-f" projectile-find-file)
("ff" projectile-find-file-dwim)
("fd" projectile-find-file-in-directory)
("g" ggtags-update-tags)
("s-g" ggtags-update-tags)
("i" projectile-ibuffer)
("K" projectile-kill-buffers)
("s-k" projectile-kill-buffers)
("m" projectile-multi-occur)
("o" projectile-multi-occur)
("s-p" projectile-switch-project "switch project")
("p" projectile-switch-project)
("s" projectile-switch-project)
("r" projectile-recentf)
("x" projectile-remove-known-project)
("X" projectile-cleanup-known-projects)
("z" projectile-cache-current-file)
("`" hydra-projectile-other-window/body "other window")
("q" nil "cancel" :color blue))
:config
(projectile-mode)
(jdormit/define-prefix "p" "projectile")
(leader-def-key "pf" #'projectile-find-file)
(leader-def-key "pg" #'projectile-grep)
(leader-def-key "pp" #'projectile-switch-project)
(leader-def-key "pc" #'projectile-compile-project)
(leader-def-key "ph" #'hydra-projectile/body)
(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))
#+END_SRC
* Mode line