2015-07-11 01:32:10 +00:00
|
|
|
;;; packages.el --- Scheme Layer packages File for Spacemacs
|
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
2015-07-11 01:32:10 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
(setq scheme-packages
|
2016-05-30 02:39:21 +00:00
|
|
|
'(
|
|
|
|
company
|
2018-01-04 06:34:23 +00:00
|
|
|
evil-cleverparens
|
2016-05-30 02:39:21 +00:00
|
|
|
geiser
|
2016-04-05 04:08:34 +00:00
|
|
|
ggtags
|
2017-08-26 21:18:09 +00:00
|
|
|
counsel-gtags
|
2016-04-05 04:08:34 +00:00
|
|
|
helm-gtags
|
2018-06-07 19:38:39 +00:00
|
|
|
parinfer
|
2016-05-30 02:39:21 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
(defun scheme/post-init-company ()
|
|
|
|
;; Geiser provides completion as long as company mode is loaded.
|
2017-01-02 05:39:04 +00:00
|
|
|
(spacemacs|add-company-backends :modes scheme-mode))
|
2015-07-11 01:32:10 +00:00
|
|
|
|
2018-01-04 06:34:23 +00:00
|
|
|
(defun scheme/pre-init-evil-cleverparens ()
|
|
|
|
(spacemacs|use-package-add-hook evil-cleverparens
|
|
|
|
:pre-init
|
|
|
|
(add-to-list 'evil-lisp-safe-structural-editing-modes 'scheme-mode)))
|
|
|
|
|
2015-07-11 01:32:10 +00:00
|
|
|
(defun scheme/init-geiser ()
|
|
|
|
(use-package geiser
|
|
|
|
:commands run-geiser
|
2017-01-02 05:39:04 +00:00
|
|
|
:init (spacemacs/register-repl 'geiser 'geiser-mode-switch-to-repl "geiser")
|
2015-07-11 01:32:10 +00:00
|
|
|
:config
|
|
|
|
(progn
|
2017-01-02 05:39:04 +00:00
|
|
|
;; prefixes
|
2015-11-28 20:13:10 +00:00
|
|
|
(spacemacs/declare-prefix-for-mode 'scheme-mode "mc" "compiling")
|
|
|
|
(spacemacs/declare-prefix-for-mode 'scheme-mode "mg" "navigation")
|
|
|
|
(spacemacs/declare-prefix-for-mode 'scheme-mode "mh" "documentation")
|
|
|
|
(spacemacs/declare-prefix-for-mode 'scheme-mode "mi" "insertion")
|
|
|
|
(spacemacs/declare-prefix-for-mode 'scheme-mode "mm" "macroexpansion")
|
|
|
|
(spacemacs/declare-prefix-for-mode 'scheme-mode "ms" "repl")
|
2017-01-02 05:39:04 +00:00
|
|
|
;; key bindings
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'scheme-mode
|
2016-01-26 16:31:15 +00:00
|
|
|
"'" 'geiser-mode-switch-to-repl
|
2015-11-12 20:07:02 +00:00
|
|
|
"," 'lisp-state-toggle-lisp-state
|
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"cc" 'geiser-compile-current-buffer
|
|
|
|
"cp" 'geiser-add-to-load-path
|
|
|
|
|
2015-11-12 20:07:02 +00:00
|
|
|
"eb" 'geiser-eval-buffer
|
|
|
|
"ee" 'geiser-eval-last-sexp
|
|
|
|
"ef" 'geiser-eval-definition
|
|
|
|
"el" 'lisp-state-eval-sexp-end-of-line
|
2015-11-27 04:34:11 +00:00
|
|
|
"er" 'geiser-eval-region
|
2015-11-12 20:07:02 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
"gb" 'geiser-pop-symbol-stack
|
|
|
|
"gm" 'geiser-edit-module
|
|
|
|
"gn" 'next-error
|
|
|
|
"gN" 'previous-error
|
|
|
|
|
|
|
|
"hh" 'geiser-doc-symbol-at-point
|
|
|
|
"hd" 'geiser-doc-look-up-manual
|
|
|
|
"hm" 'geiser-doc-module
|
|
|
|
"h<" 'geiser-xref-callers
|
|
|
|
"h>" 'geiser-xref-callees
|
|
|
|
|
|
|
|
"il" 'geiser-insert-lambda
|
|
|
|
|
|
|
|
"me" 'geiser-expand-last-sexp
|
|
|
|
"mf" 'geiser-expand-definition
|
|
|
|
"mx" 'geiser-expand-region
|
|
|
|
|
|
|
|
"si" 'geiser-mode-switch-to-repl
|
|
|
|
"sb" 'geiser-eval-buffer
|
|
|
|
"sB" 'geiser-eval-buffer-and-go
|
|
|
|
"sf" 'geiser-eval-definition
|
|
|
|
"sF" 'geiser-eval-definition-and-go
|
|
|
|
"se" 'geiser-eval-last-sexp
|
|
|
|
"sr" 'geiser-eval-region
|
2015-11-10 02:08:49 +00:00
|
|
|
"sR" 'geiser-eval-region-and-go
|
|
|
|
"ss" 'geiser-set-scheme))))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
|
|
|
(defun scheme/post-init-ggtags ()
|
2016-08-15 19:24:44 +00:00
|
|
|
(add-hook 'scheme-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
2016-04-05 04:08:34 +00:00
|
|
|
|
2017-08-26 21:18:09 +00:00
|
|
|
(defun scheme/post-init-counsel-gtags ()
|
|
|
|
(spacemacs/counsel-gtags-define-keys-for-mode 'scheme-mode))
|
|
|
|
|
2016-04-05 04:08:34 +00:00
|
|
|
(defun scheme/post-init-helm-gtags ()
|
|
|
|
(spacemacs/helm-gtags-define-keys-for-mode 'scheme-mode))
|
2017-05-29 09:35:22 +00:00
|
|
|
|
|
|
|
(defun scheme/post-init-parinfer ()
|
|
|
|
(add-hook 'scheme-mode-hook 'parinfer-mode))
|