Skip to content

BenedictHW/common-lisp-sly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Common Lisp Sly layer

   _____    __   __  __
  / ___/   / /   \ \/ /               |\      _,,,---,,_
  \__ \   / /     \  /                /,`.-'`'    -.  ;-;;,_
 ___/ /  / /___   / /                |,4-  ) )-,_..;\ (  `'-'
/____/  /_____/  /_/                '---''(_/--'  `-'\_)
Sylvester the Cat's Common Lisp IDE for Emacs

Table of Contents

Description

This layer provides support for Common Lisp to Spacemacs.

Features:

  • Syntax highlighting
  • Auto-completion using company
  • REPL support via SLY
  • Support for specific lisp navigation styles via common-lisp-mode
  • Support for sbcl backend or any other common-lisp implementation

Install

If you have previously installed slime or sly in any other way, it is recommended that you uninstall it before proceeding. You should clean up any config files tied to slime or sly that are left behind as well. Linux users can just purge the slime package if it was a distribution install.

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

This layer defaults to using sbcl. If you want to use a different implementation of Common Lisp, you can specify it in your ~/.spacemacs

(defun dotspacemacs/user-config ()
  (setq inferior-lisp-program "/path/to/your/lisp"))

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 common-lisp buffers call the following function in your dotspacemacs/user-config function:

(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-common-lisp-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

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

Help

Key bindingDescription
SPC m h aSLIME apropos
SPC m h dDisassemble symbol at point
SPC m h hDescribe symbol at point
SPC m h iInspect definition
SPC m h HHyperspec lookup symbol at point
SPC m h pBrowse apropos results for a package’s exported symbols
SPC m h tToggle tracing of the function at point
SPC m h TUntrace all functions
SPC m h <Show all known callers
SPC m h >Show all known callees
SPC m h mShow all usages of a macro
SPC m h rShow references to global variable
SPC m h sShow all methods specialized on a class

Evaluation

Key bindingDescription
SPC m e bEvaluate buffer
SPC m e cEvaluate parent sexp of current form around point
SPC m e CEvaluate current def or set form around point
SPC m e eEvaluate last sexp
SPC m e lGo to end of line and evaluate last sexp
SPC m e fEvaluate top level sexp
SPC m e FUndefine the function at point
SPC m e rEvaluate region
SPC m e sEvaluate symbol around point

REPL

Key bindingDescription
SPC m s iStart an inferior process
SPC m s eEvaluate last expression in REPL
SPC m s qQuit

Compile

Key bindingDescription
SPC m c cCompile file
SPC m c CCompile file and load it
SPC m c lLoad file
SPC m c nRemove compilation notes
SPC m c fCompile function
SPC m c rCompile region

Navigation

Key bindingDescription
SPC m g gGo to definition
SPC m g bGo back
SPC m g nNext note
SPC m g N or ~SPC m g pPrevious note

Macroexpansion

Key bindingDescription
SPC m m aMacroexpand the expression at point completly
SPC m m oMacroexpand the expression at point once

About

Emacs Packages for Common Lisp editing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published