Skip to content

Latest commit

 

History

History
80 lines (67 loc) · 5.65 KB

README.org

File metadata and controls

80 lines (67 loc) · 5.65 KB

Agda layer

Table of Contents

Description

This layer adds support for the Agda programming language.

Some features:

  • Faces redefined to correctly play with themes.
  • Spacemacs bindings to Agda’s interactive tools.

This layer is in construction, it needs your contributions and bug reports.

Install

Layer

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

Agda

Quick instructions to install Agda assuming you have cabal installed:

cabal install alex happy "cpphs < 1.19" agda

Then check that agda is available on your $PATH and seen by Emacs. For information about setting up $PATH, check out the corresponding section in the FAQ (SPC h SPC $PATH RET).

By default the agda-mode executable bundled with most agda installations is used to locate the agda-mode package. If you don’t have it and want to use a local agda-mode package, you can customize the layer variable agda-mode-path to your needs. Set it to nil if agda2.el is already discoverable in Emacs’ load path, otherwise set it to the path at which agda2.el can be found. For example,

(agda2 :variables agda-mode-path "/some/path/to/agda2.el")

Key bindings

The key bindings of this layer don’t follow the Spacemacs conventions, we opted to a simple transcription of stock Agda mode key bindings to Spacemacs leader key.

All Agda specific bindings are prefixed with the major-mode leader SPC m.

Key BindingDescription
SPC m =Show constraints.
SPC m ?Show all goals.
SPC m ​,​Shows the type of the goal at point and the currect context.
SPC m .Shows the context, the goal and the given expression’s inferred type.
SPC m aSimple proof search.
SPC m bGo to the previous goal, if any and activate goal-navigation transient-state.
SPC m cRefine the pattern variables given in the goal.
SPC m dInfers the type of the given expression.
SPC m eShow the context of the goal at point.
SPC m fGo to the next goal, if any and activate goal-navigation transient-state.
SPC m hCompute the type of a hypothetical helper function.
SPC m lLoad current buffer.
SPC m nComputes the normal form of the given expression, using the scope of the current goal or, if point is not in a goal, the top-level scope.
SPC m pShows all the top-level names in the given module.
SPC m rRefine the goal at point.
SPC m sSolves all goals that are already instantiated internally.
SPC m tShow the type of the goal at point.
SPC m x cCompile current module.
SPC m x dRemoves buffer annotations (overlays and text properties).
SPC m x hToggle display of implicit arguments.
SPC m x qQuit and clean up after agda2.
SPC m x rKill and restart the agda2 buffer and load agda2-toplevel-module.
SPC m wExplains why a given name is in scope.