lang/common-lisp: add localleader keys & hydras
Credit goes to @mfiano for these keybinds.
This commit is contained in:
parent
fc0d074f15
commit
a251c81aa3
3 changed files with 94 additions and 2 deletions
11
modules/lang/common-lisp/autoload/common-lisp.el
Normal file
11
modules/lang/common-lisp/autoload/common-lisp.el
Normal file
|
@ -0,0 +1,11 @@
|
|||
;;; lang/common-lisp/autoload/common-lisp.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +common-lisp*sly-last-sexp (command &rest args)
|
||||
"In normal-state or motion-state, last sexp ends at point."
|
||||
(if (and (not evil-move-beyond-eol)
|
||||
(or (evil-normal-state-p) (evil-motion-state-p)))
|
||||
(save-excursion
|
||||
(unless (or (eobp) (eolp)) (forward-char))
|
||||
(apply command args))
|
||||
(apply command args)))
|
38
modules/lang/common-lisp/autoload/hydras.el
Normal file
38
modules/lang/common-lisp/autoload/hydras.el
Normal file
|
@ -0,0 +1,38 @@
|
|||
;;; lang/common-lisp/autoload/hydras.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload (autoload '+common-lisp/navigation/body "lang/common-lisp/autoload/hydras" nil nil)
|
||||
(defhydra +common-lisp/navigation (:exit nil :hint nil :foreign-keys run)
|
||||
"
|
||||
^^Definitions ^^Compiler Notes ^^Stickers
|
||||
^^^^^^─────────────────────────────────────────────────────────────────────────────────────
|
||||
[_g_] Jump to definition [_n_] Next compiler note [_s_] Next sticker
|
||||
[_G_] Jump to definition (other window) [_N_] Previous compiler note [_S_] Previous sticker
|
||||
[_b_] Pop from definition
|
||||
[_q_] Exit
|
||||
"
|
||||
("g" sly-edit-definition)
|
||||
("G" sly-edit-definition-other-window)
|
||||
("b" sly-pop-find-definition-stack)
|
||||
("n" sly-next-note)
|
||||
("N" sly-previous-note)
|
||||
("s" sly-stickers-next-sticker)
|
||||
("S" sly-stickers-prev-sticker)
|
||||
("q" nil :exit t))
|
||||
|
||||
;;;###autoload (autoload '+common-lisp/macrostep/body "lang/common-lisp/autoload/hydras" nil nil)
|
||||
(defhydra +common-lisp/macrostep (:exit nil :hint nil :foreign-keys run)
|
||||
"
|
||||
Macro Expansion
|
||||
^^Definitions ^^Compiler Notes ^^Stickers
|
||||
^^^^^^─────────────────────────────────────────────────────────────────────────────────────
|
||||
[_e_] Expand
|
||||
[_c_] Collapse
|
||||
[_n_] Next level
|
||||
[_N_] Previous level
|
||||
[_q_] Exit
|
||||
"
|
||||
("e" macrostep-expand)
|
||||
("c" macrostep-collapse)
|
||||
("n" macrostep-next-macro)
|
||||
("N" macrostep-prev-macro)
|
||||
("q" macrostep-collapse-all :exit t))
|
Loading…
Add table
Add a link
Reference in a new issue