Table of Contents

Scheme layer

Table of ContentsClose

1 Description

This layer adds support for Scheme via Geiser. Note that combined usage of racket-mode and geiser has not been tested.

1.1 Features:

  • Support the Scheme compiler Chicken
  • Support for the extension language platform Guile
  • Structuraly safe editing using optional evil-cleverparens

2 Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add scheme to the existing dotspacemacs-configuration-layers list in this file.

For full Chicken support, the following commands should be run:

$ chicken-install -s apropos chicken-doc
$ cd `csi -p '(chicken-home)'`
$ curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx

3 Structuraly safe editing

This layer adds support for evil-cleverparens which allows to safely edit lisp code by keeping the s-expressions balanced.

By default this mode is not activated. You can turn it on locally on the active buffer with SPC m T s (s for safe).

To turn it on automatically for all scheme buffers call the following function in your dotspacemacs/user-config function:

(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-scheme-mode)

or to enable it for all supported modes:

(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks)

When enabled the symbol 🆂 should be displayed in the mode-line.

4 Key bindings

4.1 Compiling

Key binding Description
SPC m c c Compile current buffer
SPC m c p Add directory to load path
Key binding Description
SPC m g g Goto Definition
SPC m g b Go Back
SPC m g m Goto Module
SPC m g n Goto next error
SPC m g N Goto previous error

4.3 Documentation

Key binding Description
SPC m h h Docs for symbol at point
SPC m h d Look up manual entry for symbol at point
SPC m h m Display exports for module
SPC m h < Display callers
SPC m h > Display callees

4.4 Insertion

Key binding Description
SPC m i l Insert Lambda

4.5 Macroexpansion

Key binding Description
SPC m m e Macroexpand last sexp
SPC m m f Macroexpand surrounding sexp
SPC m m r Macroexpand region

4.6 REPL

Key binding Description
SPC m s i Start or switch to the REPL
SPC m s s Select Scheme implementation
SPC m s b Send buffer to the REPL
SPC m s B Send buffer to the REPL and focus it
SPC m s f Send definition to the REPL
SPC m s F Send definition to the REPL and focus it
SPC m s e Send last sexp to the REPL
SPC m s r Send region to the REPL
SPC m s R Send region to the REPL and focus it

4.7 Evaluation

Key binding Description
SPC m e b Evaluate the whole buffer
SPC m e e Evaluate last sexp
SPC m e f Evaluate current function
SPC m e l Evaluate line
SPC m e r Evaluate region

Author: Travis CI User

Created: 2019-01-22 Tue 20:43

Validate