2015-07-09 19:55:14 +00:00
|
|
|
;;; packages.el --- Common Lisp Layer packages File for Spacemacs
|
2015-03-07 21:58:35 +00:00
|
|
|
;;
|
|
|
|
;; Copyright (c) 2012-2014 Sylvain Benner
|
|
|
|
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2015-07-09 19:55:14 +00:00
|
|
|
(setq common-lisp-packages
|
|
|
|
'(slime))
|
2015-03-07 21:58:35 +00:00
|
|
|
|
2015-07-09 19:55:14 +00:00
|
|
|
(defun common-lisp/init-slime ()
|
2015-03-09 03:43:40 +00:00
|
|
|
(use-package slime
|
|
|
|
:commands slime-mode
|
|
|
|
:init
|
|
|
|
(progn
|
2015-03-31 05:42:13 +00:00
|
|
|
(setq slime-contribs '(slime-fancy
|
|
|
|
slime-indentation
|
|
|
|
slime-sbcl-exts
|
|
|
|
slime-scratch)
|
2015-03-09 03:43:40 +00:00
|
|
|
inferior-lisp-program "sbcl")
|
2015-03-31 05:42:13 +00:00
|
|
|
;; enable fuzzy matching in code buffer and SLIME REPL
|
|
|
|
(setq slime-complete-symbol*-fancy t)
|
|
|
|
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
|
|
|
|
;; enabel smartparen in code buffer and SLIME REPL
|
2015-05-04 13:12:25 +00:00
|
|
|
;; (add-hook 'slime-repl-mode-hook #'smartparens-strict-mode)
|
|
|
|
(defun slime/disable-smartparens ()
|
|
|
|
(smartparens-strict-mode -1)
|
|
|
|
(turn-off-smartparens-mode))
|
|
|
|
(add-hook 'slime-repl-mode-hook #'slime/disable-smartparens)
|
2015-08-23 01:47:30 +00:00
|
|
|
(spacemacs/add-to-hooks 'slime-mode '(lisp-mode-hook)))
|
2015-03-09 03:43:40 +00:00
|
|
|
:config
|
2015-06-22 03:46:36 +00:00
|
|
|
(progn
|
|
|
|
(slime-setup)
|
|
|
|
(dolist (m `(,slime-mode-map ,slime-repl-mode-map))
|
|
|
|
(define-key m [(tab)] 'slime-fuzzy-complete-symbol))
|
2015-07-11 01:32:10 +00:00
|
|
|
;; TODO: Add bindings for the SLIME debugger?
|
|
|
|
(evil-leader/set-key-for-mode 'lisp-mode
|
|
|
|
"mcc" 'slime-compile-file
|
|
|
|
"mcC" 'slime-compile-and-load-file
|
|
|
|
"mcl" 'slime-load-file
|
|
|
|
"mcf" 'slime-compile-defun
|
|
|
|
"mcr" 'slime-compile-region
|
|
|
|
"mcn" 'slime-remove-notes
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-07-11 01:32:10 +00:00
|
|
|
"meb" 'slime-eval-buffer
|
|
|
|
"mef" 'slime-eval-defun
|
|
|
|
"meF" 'slime-undefine-function
|
|
|
|
"mee" 'slime-eval-last-sexp
|
|
|
|
"mer" 'slime-eval-region
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-07-11 01:32:10 +00:00
|
|
|
"mgg" 'slime-inspect-definition
|
|
|
|
"mgb" 'slime-pop-find-definition-stack
|
|
|
|
"mgn" 'slime-next-note
|
|
|
|
"mgN" 'slime-previous-note
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-07-11 01:32:10 +00:00
|
|
|
"mha" 'slime-apropos
|
|
|
|
"mhA" 'slime-apropos-all
|
|
|
|
"mhd" 'slime-disassemble-symbol
|
|
|
|
"mhh" 'slime-describe-symbol
|
|
|
|
"mhH" 'slime-hyperspec-lookup
|
|
|
|
"mhp" 'slime-apropos-package
|
|
|
|
"mht" 'slime-toggle-trace-fdefinition
|
|
|
|
"mhT" 'slime-untrace-all
|
|
|
|
"mh<" 'slime-who-calls
|
|
|
|
"mh>" 'slime-calls-who
|
|
|
|
;; TODO: Add key bindings for who binds/sets globals?
|
|
|
|
"mhr" 'slime-who-references
|
|
|
|
"mhm" 'slime-who-macroexpands
|
|
|
|
"mhs" 'slime-who-specializes
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-07-11 01:32:10 +00:00
|
|
|
"mma" 'slime-macroexpand-all
|
|
|
|
"mmo" 'slime-macroexpand-1
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-07-11 01:32:10 +00:00
|
|
|
"mse" 'slime-eval-last-expression-in-repl
|
|
|
|
"msi" 'slime
|
|
|
|
"msq" 'slime-quit-lisp
|
|
|
|
|
|
|
|
"mtf" 'slime-toggle-fancy-trace))))
|