Skip to content

Latest commit

 

History

History
124 lines (97 loc) · 4.26 KB

README.org

File metadata and controls

124 lines (97 loc) · 4.26 KB

Scheme layer

Table of Contents

Description

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

Features:

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

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

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.

Key bindings

Compiling

Key bindingDescription
SPC m c cCompile current buffer
SPC m c pAdd directory to load path

Navigation

Key bindingDescription
SPC m g gGoto Definition
SPC m g bGo Back
SPC m g mGoto Module
SPC m g nGoto next error
SPC m g NGoto previous error

Documentation

Key bindingDescription
SPC m h hDocs for symbol at point
SPC m h dLook up manual entry for symbol at point
SPC m h mDisplay exports for module
SPC m h <Display callers
SPC m h >Display callees

Insertion

Key bindingDescription
SPC m i lInsert Lambda

Macroexpansion

Key bindingDescription
SPC m m eMacroexpand last sexp
SPC m m fMacroexpand surrounding sexp
SPC m m rMacroexpand region

REPL

Key bindingDescription
SPC m s iStart or switch to the REPL
SPC m s sSelect Scheme implementation
SPC m s bSend buffer to the REPL
SPC m s BSend buffer to the REPL and focus it
SPC m s fSend definition to the REPL
SPC m s FSend definition to the REPL and focus it
SPC m s eSend last sexp to the REPL
SPC m s rSend region to the REPL
SPC m s RSend region to the REPL and focus it

Evaluation

Key bindingDescription
SPC m e bEvaluate the whole buffer
SPC m e eEvaluate last sexp
SPC m e fEvaluate current function
SPC m e lEvaluate line
SPC m e rEvaluate region