-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-slime.el
43 lines (32 loc) · 1.69 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
(autoload 'slime-fuzzy-init "slime-fuzzy" "" nil)
;; I use sbcl, `C-h v slime-read-interactive-args RET` for details
;; you need install the program sbcl, of course
(setq slime-default-lisp 'sbcl)
(eval-after-load 'slime-fuzzy
'(require 'slime-repl))
(defun smp/set-up-slime-repl-auto-complete ()
"Bind TAB to `indent-for-tab-command', as in regular Slime buffers."
(local-set-key (kbd "TAB") 'indent-for-tab-command))
(eval-after-load 'slime
'(progn
(add-to-list 'load-path (concat (directory-of-library "slime") "/contrib"))
(setq slime-protocol-version 'ignore)
(setq slime-net-coding-system 'utf-8-unix)
(add-hook 'slime-repl-mode-hook 'sanityinc/lisp-setup)
(slime-setup '(slime-repl slime-fuzzy))
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
;; Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
(defun override-slime-repl-bindings-with-paredit ()
(define-key slime-repl-mode-map (read-kbd-macro paredit-backward-delete-key) nil))
(add-hook 'slime-repl-mode-hook 'override-slime-repl-bindings-with-paredit)
(add-hook 'slime-mode-hook 'set-up-slime-hippie-expand)
(add-hook 'slime-repl-mode-hook 'set-up-slime-hippie-expand)
(add-hook 'slime-repl-mode-hook (lambda () (setq show-trailing-whitespace nil)))
;; I don't use auto-complete anymore
;; (add-hook 'slime-mode-hook 'set-up-slime-ac)
;; (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'smp/set-up-slime-repl-auto-complete)
(eval-after-load 'auto-complete
'(add-to-list 'ac-modes 'slime-repl-mode))))
(provide 'init-slime)