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?
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'lisp-mode
|
|
|
|
"cc" 'slime-compile-file
|
|
|
|
"cC" 'slime-compile-and-load-file
|
|
|
|
"cl" 'slime-load-file
|
|
|
|
"cf" 'slime-compile-defun
|
|
|
|
"cr" 'slime-compile-region
|
|
|
|
"cn" 'slime-remove-notes
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"eb" 'slime-eval-buffer
|
|
|
|
"ef" 'slime-eval-defun
|
|
|
|
"eF" 'slime-undefine-function
|
|
|
|
"ee" 'slime-eval-last-sexp
|
|
|
|
"er" 'slime-eval-region
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"gg" 'slime-inspect-definition
|
|
|
|
"gb" 'slime-pop-find-definition-stack
|
|
|
|
"gn" 'slime-next-note
|
|
|
|
"gN" 'slime-previous-note
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"ha" 'slime-apropos
|
|
|
|
"hA" 'slime-apropos-all
|
|
|
|
"hd" 'slime-disassemble-symbol
|
|
|
|
"hh" 'slime-describe-symbol
|
|
|
|
"hH" 'slime-hyperspec-lookup
|
|
|
|
"hp" 'slime-apropos-package
|
|
|
|
"ht" 'slime-toggle-trace-fdefinition
|
|
|
|
"hT" 'slime-untrace-all
|
|
|
|
"h<" 'slime-who-calls
|
|
|
|
"h>" 'slime-calls-who
|
2015-07-11 01:32:10 +00:00
|
|
|
;; TODO: Add key bindings for who binds/sets globals?
|
2015-11-18 00:38:05 +00:00
|
|
|
"hr" 'slime-who-references
|
|
|
|
"hm" 'slime-who-macroexpands
|
|
|
|
"hs" 'slime-who-specializes
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"ma" 'slime-macroexpand-all
|
|
|
|
"mo" 'slime-macroexpand-1
|
2015-03-17 20:27:11 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"se" 'slime-eval-last-expression-in-repl
|
|
|
|
"si" 'slime
|
|
|
|
"sq" 'slime-quit-lisp
|
2015-07-11 01:32:10 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"tf" 'slime-toggle-fancy-trace))))
|