928983da47
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 | ||
config.el | ||
packages.el | ||
README.org |
Emacs Lisp layer
Description
This layer gathers all the configuration related to emacs-lisp. This should always be in your dotfile, it is not recommended to uninstall it.
Install
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add emacs-lisp
to the existing dotspacemacs-configuration-layers
list in this
file.
Auto-compile
This layer adds the auto-compile package to automatically keep the byte-compiled
version of your Emacs lisp files synced with the uncompiled version on every
save. If there are any compiler errors in the file, you will see a counter show
up in the mode line. You can hover over these numbers to get a description or
view the compiler output with the SPC m c l
key binding. To disable the
feature use this line in your dotspacemacs/user-config
function.
(remove-hook 'emacs-lisp-mode-hook 'auto-compile-mode)
You can also exclude the auto-compile
package.
Key bindings
Working with lisp files (barfage, slurpage & more)
Spacemacs comes with a special lisp-state
for working with lisp code that
supports slurpage, barfage and more tools you'll likely want when working with
lisp.
As this state works the same for all files, the documentation is in global
DOCUMENTATION.org. In general, use SPC k
to interact with the lisp-state.
Leader
Key Binding | Description |
---|---|
SPC m g g |
go to definition of symbol under point |
SPC m h h |
describe symbol at point |
SPC m c c |
byte compile the current file |
SPC m c l |
popup compile-log buffer |
SPC m e $ or SPC m e l |
go to end of current line and evaluate |
SPC m e b |
evaluate current buffer |
SPC m e c |
evaluate current form (start with defun , setq , etc…) |
SPC m e e |
evaluate sexp before point |
SPC m e r |
evaluate current region |
SPC m e f |
evaluation current function |
SPC m , |
toggle lisp state |
SPC m t b |
run tests of current buffer |
SPC m t q |
run ert |
SPC m d m |
open macrostep transient-state |
srefactor
The semantic layer should be installed for these key bindings to become active.
Key Binding | Description |
---|---|
SPC m = b |
format current buffer |
SPC m = f |
format current function |
SPC m = o |
format all on one line |
SPC m = s |
format current sexp |