Add macrostep micro-state to emacs-lisp layer.
This commit is contained in:
parent
4317bbcae3
commit
1c6fe70982
|
@ -41,6 +41,7 @@ Key Binding | Description
|
|||
<kbd>SPC m ,</kbd> | toggle `lisp state`
|
||||
<kbd>SPC m t b</kbd> | run tests of current buffer
|
||||
<kbd>SPC m t q</kbd> | run `ert`
|
||||
<kbd>SPC m d m</kbd> | open [macrostep][] micro-state
|
||||
|
||||
### srefactor
|
||||
|
||||
|
@ -54,4 +55,5 @@ Key Binding | Description
|
|||
<kbd>SPC m = o</kbd> | format all on one line
|
||||
<kbd>SPC m = s</kbd> | format current sexp
|
||||
|
||||
[macrostep]: https://github.com/joddie/macrostep
|
||||
[semantic-layer]: ../../semantic/README.md
|
||||
|
|
|
@ -11,14 +11,15 @@
|
|||
;;; License: GPLv3
|
||||
|
||||
(setq emacs-lisp-packages
|
||||
'(
|
||||
eldoc
|
||||
elisp-slime-nav
|
||||
evil
|
||||
semantic
|
||||
smartparens
|
||||
srefactor
|
||||
))
|
||||
'(
|
||||
eldoc
|
||||
elisp-slime-nav
|
||||
evil
|
||||
macrostep
|
||||
semantic
|
||||
smartparens
|
||||
srefactor
|
||||
))
|
||||
|
||||
(defun emacs-lisp/post-init-eldoc ()
|
||||
(add-hook 'emacs-lisp-mode-hook 'eldoc-mode))
|
||||
|
@ -34,6 +35,25 @@
|
|||
"mgg" 'elisp-slime-nav-find-elisp-thing-at-point
|
||||
"mhh" 'elisp-slime-nav-describe-elisp-thing-at-point))))
|
||||
|
||||
(defun emacs-lisp/init-macrostep ()
|
||||
(use-package macrostep
|
||||
:defer t
|
||||
:mode ("\\*.el\\'" . emacs-lisp-mode)
|
||||
:init
|
||||
(progn
|
||||
(spacemacs|define-micro-state macrostep
|
||||
:doc "[e] expand [c] collapse [n/N] next/previous [q] quit"
|
||||
:disable-evil-leader t
|
||||
:persistent t
|
||||
:use-minibuffer t
|
||||
:evil-leader-for-mode (emacs-lisp-mode . "mdm")
|
||||
:bindings
|
||||
("e" macrostep-expand)
|
||||
("c" macrostep-collapse)
|
||||
("n" macrostep-next-macro)
|
||||
("N" macrostep-prev-macro)
|
||||
("q" macrostep-collapse-all :exit t)))))
|
||||
|
||||
(defun emacs-lisp/post-init-evil ()
|
||||
(add-to-hook 'emacs-lisp-mode
|
||||
'(lambda ()
|
||||
|
|
Loading…
Reference in a new issue