lang/common-lisp: offload to evil-collection-sly
This commit is contained in:
parent
30c091d3f5
commit
b45cc335db
3 changed files with 2 additions and 118 deletions
|
@ -166,6 +166,7 @@ variable for an explanation of the defaults (in comments). See
|
||||||
rtags
|
rtags
|
||||||
simple
|
simple
|
||||||
slime
|
slime
|
||||||
|
sly
|
||||||
(term term ansi-term multi-term)
|
(term term ansi-term multi-term)
|
||||||
tetris
|
tetris
|
||||||
tide
|
tide
|
||||||
|
|
|
@ -3,13 +3,3 @@
|
||||||
;; HACK Fix #1772: void-variable sly-contribs errors due to sly packages (like
|
;; HACK Fix #1772: void-variable sly-contribs errors due to sly packages (like
|
||||||
;; `sly-macrostep') trying to add to `sly-contribs' before it is defined.
|
;; `sly-macrostep') trying to add to `sly-contribs' before it is defined.
|
||||||
;;;###autoload (defvar sly-contribs '(sly-fancy))
|
;;;###autoload (defvar sly-contribs '(sly-fancy))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +common-lisp--sly-last-sexp-a (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)))
|
|
||||||
|
|
|
@ -126,114 +126,7 @@
|
||||||
:desc "Untrace all" "u" #'sly-untrace-all))
|
:desc "Untrace all" "u" #'sly-untrace-all))
|
||||||
|
|
||||||
(when (featurep! :editor evil +everywhere)
|
(when (featurep! :editor evil +everywhere)
|
||||||
(add-hook 'sly-mode-hook #'evil-normalize-keymaps)
|
(add-hook 'sly-mode-hook #'evil-normalize-keymaps)))
|
||||||
(add-hook 'sly-popup-buffer-mode-hook #'evil-normalize-keymaps)
|
|
||||||
|
|
||||||
(unless evil-move-beyond-eol
|
|
||||||
(dolist (fn '(sly-eval-last-expression
|
|
||||||
sly-pprint-eval-last-expression
|
|
||||||
sly-eval-print-last-expression
|
|
||||||
sly-eval-last-expression-in-repl))
|
|
||||||
(advice-add fn :around #'+common-lisp--sly-last-sexp-a)))
|
|
||||||
(set-evil-initial-state!
|
|
||||||
'(sly-db-mode
|
|
||||||
sly-inspector-mode
|
|
||||||
sly-popup-buffer-mode
|
|
||||||
sly-xref-mode)
|
|
||||||
'normal)
|
|
||||||
|
|
||||||
(evil-define-key 'insert sly-mrepl-mode-map
|
|
||||||
[S-return] #'newline-and-indent
|
|
||||||
[backspace] #'sp-backward-delete-char
|
|
||||||
[up] (λ! () (evil-goto-line) (comint-previous-input 1))
|
|
||||||
[down] (λ! () (evil-goto-line) (comint-next-input 1)))
|
|
||||||
(evil-define-key 'normal sly-parent-map
|
|
||||||
(kbd "C-t") #'sly-pop-find-definition-stack)
|
|
||||||
(evil-define-key 'normal sly-popup-buffer-mode-map
|
|
||||||
(kbd "C-t") 'sly-pop-find-definition-stack
|
|
||||||
"q" 'quit-window)
|
|
||||||
(evil-define-key 'normal sly-db-mode-map
|
|
||||||
[follow-link] 'mouse-face
|
|
||||||
[mouse-2] 'sly-db-default-action/mouse
|
|
||||||
[remap quit-window] 'sly-db-quit
|
|
||||||
(kbd "C-i") 'sly-db-cycle
|
|
||||||
(kbd "C-j") 'sly-db-down
|
|
||||||
(kbd "C-k") 'sly-db-up
|
|
||||||
(kbd "C-m") 'sly-db-default-action
|
|
||||||
(kbd "C-S-j") 'sly-db-details-down
|
|
||||||
(kbd "C-S-k") 'sly-db-details-up
|
|
||||||
"]" 'sly-db-details-down
|
|
||||||
"[" 'sly-db-details-up
|
|
||||||
"0" 'sly-db-invoke-restart-0
|
|
||||||
"1" 'sly-db-invoke-restart-1
|
|
||||||
"2" 'sly-db-invoke-restart-2
|
|
||||||
"3" 'sly-db-invoke-restart-3
|
|
||||||
"4" 'sly-db-invoke-restart-4
|
|
||||||
"5" 'sly-db-invoke-restart-5
|
|
||||||
"6" 'sly-db-invoke-restart-6
|
|
||||||
"7" 'sly-db-invoke-restart-7
|
|
||||||
"8" 'sly-db-invoke-restart-8
|
|
||||||
"9" 'sly-db-invoke-restart-9
|
|
||||||
"a" 'sly-db-abort
|
|
||||||
"A" 'sly-db-break-with-system-debugger
|
|
||||||
"b" 'sly-db-break-on-return
|
|
||||||
"B" 'sly-db-break-with-default-debugger
|
|
||||||
"c" 'sly-db-continue
|
|
||||||
"C" 'sly-db-inspect-condition
|
|
||||||
"d" 'sly-db-pprint-eval-in-frame
|
|
||||||
"D" 'sly-db-disassemble
|
|
||||||
"e" 'sly-db-eval-in-frame
|
|
||||||
"g:" 'sly-interactive-eval
|
|
||||||
"g?" 'describe-mode
|
|
||||||
"gg" 'sly-db-beginning-of-backtrace
|
|
||||||
"gj" 'sly-db-down
|
|
||||||
"gk" 'sly-db-up
|
|
||||||
"gr" 'sly-db-restart-frame
|
|
||||||
"G" 'sly-db-end-of-backtrace
|
|
||||||
"i" 'sly-db-inspect-in-frame
|
|
||||||
"I" 'sly-db-invoke-restart-by-name
|
|
||||||
"n" 'sly-db-next
|
|
||||||
"o" 'sly-db-out
|
|
||||||
"P" 'sly-db-print-condition
|
|
||||||
"q" 'sly-db-quit
|
|
||||||
"R" 'sly-db-return-from-frame
|
|
||||||
"s" 'sly-db-step
|
|
||||||
"S" 'sly-db-show-frame-source
|
|
||||||
"t" 'sly-db-toggle-details)
|
|
||||||
(evil-define-key 'normal sly-inspector-mode-map
|
|
||||||
[backtab] 'backward-button
|
|
||||||
[return] 'push-button
|
|
||||||
[(shift tab)] 'backward-button
|
|
||||||
(kbd "<M-return>") 'sly-mrepl-copy-part-to-repl
|
|
||||||
(kbd "C-i") 'next-button
|
|
||||||
(kbd "C-m") 'push-button
|
|
||||||
"e" 'sly-inspector-eval
|
|
||||||
"gb" 'sly-inspector-pop
|
|
||||||
"gj" 'sly-inspector-next
|
|
||||||
"gr" 'sly-inspector-reinspect
|
|
||||||
"gR" 'sly-inspector-fetch-all
|
|
||||||
"gv" 'sly-inspector-toggle-verbose
|
|
||||||
"h" 'sly-inspector-history
|
|
||||||
"k" 'backward-button
|
|
||||||
"K" 'sly-inspector-describe-inspectee
|
|
||||||
"p" 'sly-button-pretty-print
|
|
||||||
"q" 'sly-inspector-quit)
|
|
||||||
(evil-define-key 'normal sly-mode-map
|
|
||||||
(kbd "C-t") 'sly-pop-find-definition-stack)
|
|
||||||
(evil-define-key 'normal sly-xref-mode-map
|
|
||||||
[return] 'sly-goto-xref
|
|
||||||
(kbd "S-<return>") 'sly-show-xref
|
|
||||||
(kbd "C-j") 'sly-xref-next-line
|
|
||||||
(kbd "C-k") 'sly-xref-prev-line
|
|
||||||
"]" 'sly-xref-next-line
|
|
||||||
"[" 'sly-xref-prev-line
|
|
||||||
"gj" 'sly-xref-next-line
|
|
||||||
"gk" 'sly-xref-prev-line
|
|
||||||
"go" 'sly-show-xref
|
|
||||||
"gr" 'sly-recompile-xref
|
|
||||||
"gR" 'sly-recompile-all-xrefs
|
|
||||||
"q" 'quit-window
|
|
||||||
"r" 'sly-xref-retract)))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! sly-repl-ansi-color
|
(use-package! sly-repl-ansi-color
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue