Skip to content

Commit

Permalink
Switch from slime to sly
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Nov 22, 2023
1 parent 72ac822 commit 1cf308d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 35 deletions.
2 changes: 1 addition & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
34 changes: 0 additions & 34 deletions lisp/init-slime.el

This file was deleted.

46 changes: 46 additions & 0 deletions lisp/init-sly.el
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1cf308d

Please sign in to comment.