Emacs/SLY: Initial configuration.
parent
9d3a0debb6
commit
2c0206b620
|
@ -117,18 +117,21 @@
|
|||
(exwm-input-set-key (kbd "s-p") #'helm-pass))
|
||||
|
||||
(autoload 'ambrevar/slime-to-repl "lisp")
|
||||
(exwm-input-set-key (kbd "s-<backspace>") #'ambrevar/slime-switch-to-repl)
|
||||
;; (exwm-input-set-key (kbd "s-<backspace>") #'ambrevar/slime-switch-to-repl)
|
||||
(exwm-input-set-key (kbd "s-<backspace>") #'sly)
|
||||
(defun ambrevar/repl-switcher ()
|
||||
"Switch between Geiser and SLIME REPLs."
|
||||
(interactive)
|
||||
(pcase
|
||||
(completing-read "Lisp: " '(geiser slime))
|
||||
(completing-read "Lisp: " '(geiser slime sly))
|
||||
("geiser"
|
||||
(autoload 'helm-geiser-repl-switch "scheme")
|
||||
(exwm-input-set-key (kbd "s-<backspace>") #'helm-geiser-repl-switch)
|
||||
(exwm-input-set-key (kbd "S-s-<backspace>") #'helm-geiser-repl-switch-other-window))
|
||||
("slime"
|
||||
(exwm-input-set-key (kbd "s-<backspace>") #'ambrevar/slime-switch-to-repl))))
|
||||
(exwm-input-set-key (kbd "s-<backspace>") #'ambrevar/slime-switch-to-repl))
|
||||
("sly"
|
||||
(exwm-input-set-key (kbd "s-<backspace>") #'sly))))
|
||||
(exwm-input-set-key (kbd "s-C-<backspace>") #'ambrevar/repl-switcher)
|
||||
|
||||
;;; External application shortcuts.
|
||||
|
|
|
@ -150,6 +150,14 @@
|
|||
(define-key geiser-repl-mode-map (kbd "M-p") 'helm-comint-input-ring))
|
||||
(add-hook 'geiser-repl-mode-hook 'ambrevar/helm/geiser-set-keys))
|
||||
|
||||
;;; SLY
|
||||
(with-eval-after-load 'sly
|
||||
(with-eval-after-load 'sly-mrepl
|
||||
(define-key sly-mrepl-mode-map (kbd "M-p") 'helm-comint-input-ring)
|
||||
(define-key sly-mrepl-mode-map (kbd "M-s f") 'helm-comint-prompts-all))
|
||||
(with-eval-after-load 'helm-company
|
||||
(define-key sly-mrepl-mode-map (kbd "M-<tab>") 'helm-company)))
|
||||
|
||||
;;; SLIME
|
||||
(with-eval-after-load 'slime
|
||||
(when (require 'helm-slime nil t)
|
||||
|
|
|
@ -39,7 +39,27 @@
|
|||
(when (fboundp 'rainbow-delimiters-mode)
|
||||
(add-hook 'lisp-mode-hook #'rainbow-delimiters-mode))
|
||||
|
||||
;;; Common LISP.
|
||||
;; Read CLHS locally.
|
||||
(or
|
||||
;; Quicklisp package.
|
||||
(load "~/.quicklisp/clhs-use-local.el" 'noerror)
|
||||
;; Unofficial Guix package (non-free license).
|
||||
(when (require 'clhs nil 'noerror)
|
||||
(clhs-setup)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Sly
|
||||
(with-eval-after-load 'sly
|
||||
(setq sly-lisp-implementations
|
||||
'((sbcl ("sbcl" "--noinform"))
|
||||
(ccl ("ccl"))
|
||||
(ecl ("ecl"))))
|
||||
(add-hook 'sly-mrepl-hook 'ambrevar/init-lispy)
|
||||
(add-hook 'sly-mrepl-hook #'rainbow-delimiters-mode)
|
||||
(add-hook 'sly-mrepl-hook #'company-mode))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; SLIME
|
||||
(defun ambrevar/slime-switch-to-repl () ; TODO: Replace with `helm-defswitch'.
|
||||
(interactive)
|
||||
(require 'slime)
|
||||
|
@ -53,7 +73,7 @@
|
|||
(helm-slime-mini)
|
||||
(pop-to-buffer (slime-output-buffer))))))
|
||||
|
||||
(defun slime-rainbow-init ()
|
||||
(defun ambrevar/slime-rainbow-init ()
|
||||
(font-lock-mode -1)
|
||||
(rainbow-delimiters-mode)
|
||||
(font-lock-mode))
|
||||
|
@ -85,20 +105,13 @@
|
|||
(add-to-list 'slime-extra 'slime-company))
|
||||
(slime-setup slime-extra)
|
||||
(add-hook 'slime-repl-mode-hook 'ambrevar/init-lispy)
|
||||
(add-hook 'slime-repl-mode-hook #'slime-rainbow-init)))
|
||||
(add-hook 'slime-repl-mode-hook #'ambrevar/slime-rainbow-init)))
|
||||
|
||||
(when (require 'helm-slime nil 'noerror)
|
||||
(global-helm-slime-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "SLIME xrefs"))
|
||||
|
||||
;; Read CLHS locally.
|
||||
(or
|
||||
;; Quicklisp package.
|
||||
(load "~/.quicklisp/clhs-use-local.el" 'noerror)
|
||||
;; Unofficial Guix package (non-free license).
|
||||
(when (require 'clhs nil 'noerror)
|
||||
(clhs-setup)))
|
||||
|
||||
;; REVIEW: Redshank is probably dead: merge those features into SLIME/Sly?
|
||||
(with-eval-after-load 'redshank
|
||||
(setq redshank-accessor-name-function 'redshank-accessor-name/%)
|
||||
(define-key lisp-mode-map (kbd "C-x C-r c") 'redshank-defclass-skeleton)
|
||||
|
|
Loading…
Reference in New Issue