diff --git a/init.el b/init.el index 70bf945820..7393bf1f2b 100644 --- a/init.el +++ b/init.el @@ -123,7 +123,7 @@ (require 'init-paredit) (require 'init-lisp) -(require 'init-slime) +(require 'init-sly) (require 'init-clojure) (require 'init-clojure-cider) (require 'init-common-lisp) diff --git a/lisp/init-slime.el b/lisp/init-slime.el deleted file mode 100644 index e7183c3a20..0000000000 --- a/lisp/init-slime.el +++ /dev/null @@ -1,34 +0,0 @@ -;;; init-slime.el --- Slime support for Common Lisp -*- lexical-binding: t -*- -;;; Commentary: -;;; Code: - - - -;;; Lisp buffers - -(with-eval-after-load 'slime - (setq slime-protocol-version 'ignore) - (setq slime-net-coding-system 'utf-8-unix) - (let ((features '(slime-fancy slime-repl slime-fuzzy slime-autodoc))) - (slime-setup features))) - - -;;; REPL - -(defun sanityinc/slime-repl-setup () - "Mode setup function for slime REPL." - (sanityinc/lisp-setup)) - -(with-eval-after-load 'slime-repl - ;; Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '(' - (with-eval-after-load 'paredit - (define-key slime-repl-mode-map (read-kbd-macro paredit-backward-delete-key) nil)) - - ;; Bind TAB to `indent-for-tab-command', as in regular Slime buffers. - (define-key slime-repl-mode-map (kbd "TAB") 'indent-for-tab-command) - - (add-hook 'slime-repl-mode-hook 'sanityinc/slime-repl-setup)) - - -(provide 'init-slime) -;;; init-slime.el ends here diff --git a/lisp/init-sly.el b/lisp/init-sly.el new file mode 100644 index 0000000000..ee9fca4837 --- /dev/null +++ b/lisp/init-sly.el @@ -0,0 +1,46 @@ +;;; init-sly.el --- Sly support for Common Lisp -*- lexical-binding: t -*- +;;; Commentary: +;;; Code: + +(require-package 'sly) +(require-package 'sly-asdf) +(require-package 'sly-macrostep) +(require-package 'sly-repl-ansi-color) + + +;;; Lisp buffers + +(defun sanityinc/sly-setup () + "Mode setup function for sly lisp buffers." + (set-up-sly-hippie-expand)) + +(with-eval-after-load 'sly + (setq sly-protocol-version 'ignore) + (setq sly-net-coding-system 'utf-8-unix) + (let ((features '(sly-fancy))) + ;; (when (require 'sly-company nil t) + ;; (push 'sly-company features)) + (sly-setup features)) + (add-hook 'sly-mode-hook 'sanityinc/sly-setup)) + + +;;; REPL + +(defun sanityinc/sly-repl-setup () + "Mode setup function for sly REPL." + (sanityinc/lisp-setup) + (set-up-sly-hippie-expand)) + +(with-eval-after-load 'sly-repl + ;; Stop SLY's REPL from grabbing DEL, which is annoying when backspacing over a '(' + (with-eval-after-load 'paredit + (define-key sly-repl-mode-map (read-kbd-macro paredit-backward-delete-key) nil)) + + ;; Bind TAB to `indent-for-tab-command', as in regular Sly buffers. + (define-key sly-repl-mode-map (kbd "TAB") 'indent-for-tab-command) + + (add-hook 'sly-repl-mode-hook 'sanityinc/sly-repl-setup)) + + +(provide 'init-sly) +;;; init-sly.el ends here