2015-12-20 02:26:34 -05:00
|
|
|
;;; core-eval.el
|
2015-06-15 09:05:52 +02:00
|
|
|
|
2016-04-23 22:08:46 -04:00
|
|
|
;; + Running inline code + REPLs (using `quickrun' + `repl-toggle')
|
|
|
|
;; + Almost-universal debugging (with `realgud')
|
|
|
|
;; + Simple code navigation (using `dump-jump' and `imenu-list')
|
|
|
|
;; + A universal tags config (WIP)
|
|
|
|
|
2015-06-15 09:05:52 +02:00
|
|
|
(use-package quickrun
|
|
|
|
:commands (quickrun
|
|
|
|
quickrun-region
|
|
|
|
quickrun-with-arg
|
|
|
|
quickrun-shell
|
|
|
|
quickrun-compile-only
|
|
|
|
quickrun-replace-region
|
2015-06-24 15:39:13 +02:00
|
|
|
helm-quickrun)
|
2016-03-27 18:18:43 -04:00
|
|
|
:init
|
|
|
|
(add-hook 'quickrun/mode-hook 'linum-mode)
|
2015-06-24 15:39:13 +02:00
|
|
|
:config
|
2015-12-21 05:44:44 -05:00
|
|
|
(setq quickrun-focus-p nil)
|
2016-03-29 23:13:31 -04:00
|
|
|
(push '("\\.gvy$" . "groovy") quickrun-file-alist))
|
2015-06-15 09:05:52 +02:00
|
|
|
|
2015-11-25 06:00:49 -05:00
|
|
|
(use-package repl-toggle
|
|
|
|
:commands (rtog/toggle-repl rtog/add-repl)
|
2015-12-09 01:54:30 -05:00
|
|
|
:init
|
2015-12-20 02:26:34 -05:00
|
|
|
(setq rtog/mode-repl-alist '())
|
2015-12-09 01:54:30 -05:00
|
|
|
|
2016-03-31 03:19:30 -04:00
|
|
|
(defvar narf--repl-buffer nil)
|
2015-12-21 05:44:44 -05:00
|
|
|
(defvar repl-p nil)
|
|
|
|
(make-variable-buffer-local 'repl-p)
|
|
|
|
|
2016-02-20 15:32:19 -05:00
|
|
|
(add-hook! repl-toggle-mode
|
2015-12-20 02:26:34 -05:00
|
|
|
(evil-initialize-state 'emacs)
|
2016-03-04 22:39:48 -05:00
|
|
|
(setq repl-p t))
|
2016-02-20 15:32:19 -05:00
|
|
|
|
2016-02-16 07:22:23 -05:00
|
|
|
:config
|
|
|
|
(map! :map repl-toggle-mode-map
|
2016-02-23 13:09:15 -05:00
|
|
|
:ei "C-n" 'comint-next-input
|
|
|
|
:ei "C-p" 'comint-previous-input
|
|
|
|
:ei "<down>" 'comint-next-input
|
|
|
|
:ei "<up>" 'comint-previous-input))
|
2015-11-25 06:00:49 -05:00
|
|
|
|
2016-04-23 22:08:46 -04:00
|
|
|
;;
|
|
|
|
(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
|
|
|
|
;; FIXME Greedy command buffer always grabs focus
|
|
|
|
:m "n" 'realgud:cmd-next
|
|
|
|
:m "b" 'realgud:cmd-break
|
|
|
|
:m "B" 'realgud:cmd-clear
|
|
|
|
:n "c" 'realgud:cmd-continue)
|
|
|
|
|
|
|
|
;; Temporary Ex commands for the debugger
|
|
|
|
(def-tmp-excmd! narf:def-debug-on narf:def-debug-off
|
|
|
|
("n[ext]" . realgud:cmd-next)
|
|
|
|
("s[tep]" . realgud:cmd-step)
|
|
|
|
("b[reak]" . narf:debug-toggle-breakpoint)
|
|
|
|
("c[ontinue]" . realgud:cmd-continue))
|
|
|
|
|
|
|
|
(advice-add 'realgud-cmdbuf-init :after 'narf:def-debug-on)
|
|
|
|
(advice-add 'realgud:cmd-quit :after 'narf:def-debug-off))
|
|
|
|
|
2015-12-20 02:26:34 -05:00
|
|
|
(provide 'core-eval)
|
|
|
|
;;; core-eval.el ends here
|