This commit defines: - spacemacs-default-jump-handlers: a list of functions that can jump to definition in ALL modes. - spacemacs-jump-handlers-MODE: a list of functions that can jump to definition in MODE. - spacemacs-jump-handlers: a buffer-local list of functions that can jump to definition. This is made up of the values of the two previous variables whenever a given major mode is activated. - spacemacs/jump-to-definition: a function that tries each function in spacemacs-jump-handlers in order, and stops when one of them takes us somewhere new. - spacemacs|define-jump-handlers: a macro that * defines spacemacs-jump-handlers-MODE, possibly filled with initial functions * defines a function that is added to the hook of the given MODE * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition This is an attempt to harmonize all the different approaches to jumping. Specifically, - Existing intelligent jump packages that work for only a single mode should go to the beginning of spacemacs-jump-handlers-MODE. E.g. anaconda for python, ensime for scala, etc. - Packages like gtags that work for several modes (but potentially not all) and which is dumber than the intelligent jumpers should go the the END of spacemacs-jump-handlers-MODE. - Packages like dumb-jump that work for all modes should go to spacemacs-default-jump-handlers. In all cases the order of the jump handlers in each list should be from most to least intelligent. Fixes #6619 |
||
---|---|---|
.. | ||
img | ||
packages.el | ||
README.org |
Racket layer
Description
Adds support for the Racket programming language.
Install
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add racket
to the existing dotspacemacs-configuration-layers
list in this
file. You will also need DrRacket installed. Alternatively, one can use the
"Minimal Racket" installation, and then run the following command.
raco pkg install drracket
Key Bindings
Navigation
Key Binding | Description |
---|---|
SPC m g ` |
Return to previous location |
SPC m g g |
Go to definition of symbol at point |
SPC m g m |
Go to module at point |
SPC m g r |
Open require path |
Documentation
Key Binding | Description |
---|---|
SPC m h d |
Describes the function at point in a Racket Describe buffer |
SPC m h h |
View documentation of the identifier or string at point. |
Tests
Key Binding | Description |
---|---|
SPC m t b |
Run tests of buffer |
SPC m t B |
Run tests of buffer with coverage |
REPL
Key Binding | Description |
---|---|
SPC m s b |
Send buffer to REPL |
SPC m s B |
Send buffer to REPL and switch to REPL buffer in insert state |
SPC m s e |
Send last sexp to REPL |
SPC m s E |
Send last sexp to REPL and switch to REPL in insert state |
SPC m s f |
Send function at point to REPL |
SPC m s F |
Send function at point and switch to REPL in insert state |
SPC m s i |
Start a REPL or switch to REPL buffer |
SPC m s r |
Send region to REPL |
SPC m s R |
Send region to REPL and switch to REPL in insert state |
SPC m s s |
Show and switch to REPL buffer |
Other key bindings
Key Binding | Description |
---|---|
SPC m i l |
Insert lambda character |
H-r |
Run current file and open REPL (H is hyper, may be bound to command on OSX) |