Rearrange db/debug initfiles
This commit is contained in:
parent
9ee28fda89
commit
8b83c03782
7 changed files with 53 additions and 50 deletions
6
Cask
6
Cask
|
@ -127,9 +127,8 @@
|
||||||
;;(depends-on "helm-projectile")
|
;;(depends-on "helm-projectile")
|
||||||
;;(depends-on "helm-swoop")
|
;;(depends-on "helm-swoop")
|
||||||
|
|
||||||
;; Code evaluation/REPLs/debug -- core/core-eval.el
|
;; Code evaluation/REPLs -- core/core-eval.el
|
||||||
(depends-on "quickrun")
|
(depends-on "quickrun")
|
||||||
(depends-on "realgud")
|
|
||||||
(depends-on "repl-toggle")
|
(depends-on "repl-toggle")
|
||||||
|
|
||||||
;; Sessions --- core/core-sessions.el
|
;; Sessions --- core/core-sessions.el
|
||||||
|
@ -288,3 +287,6 @@
|
||||||
|
|
||||||
;; Writing -- modules/custom-write.el
|
;; Writing -- modules/custom-write.el
|
||||||
; (depends-on "helm-bibtex")
|
; (depends-on "helm-bibtex")
|
||||||
|
|
||||||
|
;; Debugging -- modules/custom-debug.el
|
||||||
|
(depends-on "realgud")
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
;;; core-eval.el
|
;;; core-eval.el
|
||||||
|
|
||||||
;; + Running inline code + REPLs (using `quickrun' + `repl-toggle')
|
;; + Running inline code + REPLs (using `quickrun' + `repl-toggle')
|
||||||
;; + Almost-universal debugging (with `realgud')
|
|
||||||
;; + Simple code navigation (using `dump-jump' and `imenu-list')
|
;; + Simple code navigation (using `dump-jump' and `imenu-list')
|
||||||
;; + A universal tags config (WIP)
|
|
||||||
|
|
||||||
;; remove ellipsis when printing sexp in message buffer
|
;; remove ellipsis when printing sexp in message buffer
|
||||||
(setq eval-expression-print-length nil
|
(setq eval-expression-print-length nil
|
||||||
|
@ -47,43 +45,5 @@
|
||||||
:ei "<down>" 'comint-next-input
|
:ei "<down>" 'comint-next-input
|
||||||
:ei "<up>" 'comint-previous-input))
|
:ei "<up>" 'comint-previous-input))
|
||||||
|
|
||||||
;;
|
|
||||||
(after! debug
|
|
||||||
;; For elisp debugging
|
|
||||||
(map! :map debugger-mode-map
|
|
||||||
:n "RET" 'debug-help-follow
|
|
||||||
:n "n" 'debugger-step-through
|
|
||||||
:n "c" 'debugger-continue))
|
|
||||||
|
|
||||||
(use-package realgud
|
|
||||||
:commands (realgud:gdb realgud:trepanjs realgud:bashdb realgud:zshdb)
|
|
||||||
:config
|
|
||||||
(map! :map realgud:shortkey-mode-map
|
|
||||||
:n "j" 'evil-next-line
|
|
||||||
:n "k" 'evil-previous-line
|
|
||||||
:n "h" 'evil-backward-char
|
|
||||||
:n "l" 'evil-forward-char
|
|
||||||
:m "n" 'realgud:cmd-next
|
|
||||||
:m "b" 'realgud:cmd-break
|
|
||||||
:m "B" 'realgud:cmd-clear
|
|
||||||
:n "c" 'realgud:cmd-continue)
|
|
||||||
|
|
||||||
;; Popup rules
|
|
||||||
(def-popup! "\\`\\*\\(g\\|zsh\\|bash\\)db.*?\\*\\'" :size 20 :regexp t)
|
|
||||||
(def-popup! "\\`\\*trepanjs.*?\\*\\'" :size 20 :regexp t)
|
|
||||||
|
|
||||||
;; Temporary Ex commands for the debugger
|
|
||||||
(def-tmp-excmd! doom:def-debug-on doom:def-debug-off
|
|
||||||
("n[ext]" . realgud:cmd-next)
|
|
||||||
("s[tep]" . realgud:cmd-step)
|
|
||||||
("b[reak]" . doom:debug-toggle-breakpoint)
|
|
||||||
("c[ontinue]" . realgud:cmd-continue))
|
|
||||||
|
|
||||||
;; TODO does this work with shackle?
|
|
||||||
(advice-add 'realgud-cmdbuf-init :after 'doom:def-debug-on)
|
|
||||||
(advice-add 'realgud:cmd-quit :after 'doom:def-debug-off)
|
|
||||||
;; Monkey-patch `realgud:run-process' to run in a popup.
|
|
||||||
(advice-add 'realgud:run-process :override 'doom*realgud:run-process))
|
|
||||||
|
|
||||||
(provide 'core-eval)
|
(provide 'core-eval)
|
||||||
;;; core-eval.el ends here
|
;;; core-eval.el ends here
|
||||||
|
|
10
init.el
10
init.el
|
@ -50,7 +50,7 @@
|
||||||
core-vcs ; remember remember, that commit in November
|
core-vcs ; remember remember, that commit in November
|
||||||
core-ivy ; a search engine for life and love
|
core-ivy ; a search engine for life and love
|
||||||
core-workgroups ; cure Emacs alzheimers + tab emulation
|
core-workgroups ; cure Emacs alzheimers + tab emulation
|
||||||
core-eval ; run code, run; debug too
|
core-eval ; run code, run + REPL support
|
||||||
|
|
||||||
;;; Dev environments
|
;;; Dev environments
|
||||||
module-cc ; C/C++/Obj-C madness
|
module-cc ; C/C++/Obj-C madness
|
||||||
|
@ -58,7 +58,6 @@
|
||||||
module-csharp ; unity, .NET, and mono shenanigans
|
module-csharp ; unity, .NET, and mono shenanigans
|
||||||
module-css ; #big-bang::before { content: ""; }
|
module-css ; #big-bang::before { content: ""; }
|
||||||
module-data ; config/data formats
|
module-data ; config/data formats
|
||||||
module-db ; using emacs as a db browser/client
|
|
||||||
module-elisp ; drowning in parentheses
|
module-elisp ; drowning in parentheses
|
||||||
module-eshell ; so I can have a sane shell, even in Windows
|
module-eshell ; so I can have a sane shell, even in Windows
|
||||||
module-go ; the hipster dialect
|
module-go ; the hipster dialect
|
||||||
|
@ -69,7 +68,7 @@
|
||||||
module-latex ; for writing papers in Emacs
|
module-latex ; for writing papers in Emacs
|
||||||
module-lua ; one-based indices? one-based indices.
|
module-lua ; one-based indices? one-based indices.
|
||||||
module-php ; making php less painful to work with
|
module-php ; making php less painful to work with
|
||||||
module-processing ; pretty prototypes
|
module-processing ; for prototyping
|
||||||
module-python ; beautiful is better than ugly
|
module-python ; beautiful is better than ugly
|
||||||
module-rest ; Emacs as a service
|
module-rest ; Emacs as a service
|
||||||
module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"}
|
module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"}
|
||||||
|
@ -80,11 +79,12 @@
|
||||||
module-text ; writing docs for people to ignore
|
module-text ; writing docs for people to ignore
|
||||||
module-web ; The end is always near </html>
|
module-web ; The end is always near </html>
|
||||||
|
|
||||||
;;; Experimental
|
;;; Org
|
||||||
module-eshell ; for inferior OSes *cough*windows
|
|
||||||
module-org ; for organized fearless leader
|
module-org ; for organized fearless leader
|
||||||
|
|
||||||
;;; Custom modules
|
;;; Custom modules
|
||||||
|
custom-db ; emacs as a db browser/client
|
||||||
|
custom-debug ; nigh-universal debugging
|
||||||
custom-demo ; allow me to demonstrate...
|
custom-demo ; allow me to demonstrate...
|
||||||
custom-tags ; if you liked it you should've generated a tag for it
|
custom-tags ; if you liked it you should've generated a tag for it
|
||||||
custom-tmux ; close the rift between GUI & terminal
|
custom-tmux ; close the rift between GUI & terminal
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;;; module-db.el
|
;;; custom-db.el
|
||||||
|
|
||||||
(use-package sql-mode
|
(use-package sql-mode
|
||||||
:mode "\\.sql$"
|
:mode "\\.sql$"
|
||||||
|
@ -39,5 +39,5 @@ open comint."
|
||||||
(sql-product-interactive product 0)
|
(sql-product-interactive product 0)
|
||||||
(message "Started new %s connection" product)))))
|
(message "Started new %s connection" product)))))
|
||||||
|
|
||||||
(provide 'module-db)
|
(provide 'custom-db)
|
||||||
;;; module-db.el ends here
|
;;; custom-db.el ends here
|
41
modules/custom-debug.el
Normal file
41
modules/custom-debug.el
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
;;; custom-debug.el --- debugging with `realgud'
|
||||||
|
|
||||||
|
(after! debug
|
||||||
|
;; For elisp debugging
|
||||||
|
(map! :map debugger-mode-map
|
||||||
|
:n "RET" 'debug-help-follow
|
||||||
|
:n "n" 'debugger-step-through
|
||||||
|
:n "c" 'debugger-continue))
|
||||||
|
|
||||||
|
(use-package realgud
|
||||||
|
:commands (realgud:gdb realgud:trepanjs realgud:bashdb realgud:zshdb)
|
||||||
|
:config
|
||||||
|
(map! :map realgud:shortkey-mode-map
|
||||||
|
:n "j" 'evil-next-line
|
||||||
|
:n "k" 'evil-previous-line
|
||||||
|
:n "h" 'evil-backward-char
|
||||||
|
:n "l" 'evil-forward-char
|
||||||
|
:m "n" 'realgud:cmd-next
|
||||||
|
:m "b" 'realgud:cmd-break
|
||||||
|
:m "B" 'realgud:cmd-clear
|
||||||
|
:n "c" 'realgud:cmd-continue)
|
||||||
|
|
||||||
|
;; Popup rules
|
||||||
|
(def-popup! "\\`\\*\\(g\\|zsh\\|bash\\)db.*?\\*\\'" :size 20 :regexp t)
|
||||||
|
(def-popup! "\\`\\*trepanjs.*?\\*\\'" :size 20 :regexp t)
|
||||||
|
|
||||||
|
;; Temporary Ex commands for the debugger
|
||||||
|
(def-tmp-excmd! doom:def-debug-on doom:def-debug-off
|
||||||
|
("n[ext]" . realgud:cmd-next)
|
||||||
|
("s[tep]" . realgud:cmd-step)
|
||||||
|
("b[reak]" . doom:debug-toggle-breakpoint)
|
||||||
|
("c[ontinue]" . realgud:cmd-continue))
|
||||||
|
|
||||||
|
;; TODO does this work with shackle?
|
||||||
|
(advice-add 'realgud-cmdbuf-init :after 'doom:def-debug-on)
|
||||||
|
(advice-add 'realgud:cmd-quit :after 'doom:def-debug-off)
|
||||||
|
;; Monkey-patch `realgud:run-process' to run in a popup.
|
||||||
|
(advice-add 'realgud:run-process :override 'doom*realgud:run-process))
|
||||||
|
|
||||||
|
(provide 'custom-debug)
|
||||||
|
;;; custom-debug.el ends here
|
Loading…
Add table
Add a link
Reference in a new issue