-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-slime.el
48 lines (35 loc) · 1.56 KB
/
init-slime.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(require-package 'slime)
;; package.el compiles the contrib subdir, but the compilation order
;; causes problems, so we remove the .elc files there. See
;; http://lists.common-lisp.net/pipermail/slime-devel/2012-February/018470.html
(mapc #'delete-file
(file-expand-wildcards (concat user-emacs-directory "elpa/slime-2*/contrib/*.elc")))
(require-package 'hippie-expand-slime)
(maybe-require-package 'slime-company)
;;; Lisp buffers
(defun jester/slime-setup ()
"Mode setup function for slime lisp buffers."
(set-up-slime-hippie-expand))
(after-load 'slime
(setq slime-protocol-version 'ignore)
(setq slime-net-coding-system 'utf-8-unix)
(let ((extras (when (require 'slime-company nil t)
'(slime-company))))
(slime-setup (append '(slime-repl slime-fuzzy) extras)))
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
(add-hook 'slime-mode-hook 'jester/slime-setup))
;;; REPL
(defun jester/slime-repl-setup ()
"Mode setup function for slime REPL."
(jester/lisp-setup)
(set-up-slime-hippie-expand)
(setq show-trailing-whitespace nil))
(after-load 'slime-repl
;; Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
(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 'jester/slime-repl-setup))
(provide 'init-slime)