Skip to content

Latest commit

 

History

History
85 lines (74 loc) · 4.04 KB

README.org

File metadata and controls

85 lines (74 loc) · 4.04 KB

Factor Layer

img/logo.png

Table of Contents

Description

A spacemacs layer for Factor language support.

Features:

  • Syntax Highlighting
  • Factor REPL integration
  • Auto-Completion in REPL
  • Scaffolding support
  • Refactoring support

Install

This layer depends on the elisp files that are bundled with factor. To use this layer, make sure that factor is installed and the bundled elisp files are picked up by emacs (usually somewhere in site-lisp).

To use this layer, add it to your ./spacemacs file. Add factor to the dotspacemacs-configuration-layers list there.

Key bindings

factor-mode (editing source files)

Key bindingDescription
SPC m 'Jump to the factor listener, start if required
SPC m c cCompile and run the current file
SPC m e fEvaluate definition at point
SPC m e rEvaluate region
SPC m e REvaluate region extended to nearest definition
SPC m g gJump to definition of word under point
SPC m g GJump to definition of word under point in other window
SPC m g aCycle between source, test, and documentation
SPC m t aRun tests for current vocab
SPC m r sExtract innermost sexp as separate word
SPC m r rExtract region as separate word
SPC m r vCreate new Vocab with words in region
SPC m r iInline word
SPC m r wRename all occurences of word
SPC m r aExtract region as new ARTICLE form
SPC m r gTurn current definition into generic word
SPC m s sSwitch to factor listener
SPC m h hHelp for thing at point
SPC m h eInfer stack effect for sexp/region
SPC m h pApropos
SPC m h vList all words in current file/vocab
SPC m h <Show calling words of current word
SPC m h >Show words called by current word
SPC m S vScaffold vocab
SPC m S hScaffold help for current vocab

fuel-listener-mode

Key bindingDescription
SPC m rRefresh all loaded vocabs
SPC m T sToggle stack mode
SPC m hHelp for word at point
SPC m vEdit vocab
SPC m S vScaffold vocab

Snippets

This layer provides a yasnippet for colon definitions, which can be expanded after typing a single :. Note that you might have to set yas-triggers-in-field to nil if you use x for stack effect declaration elements a lot, as this will trigger a builtin snippet from prog-mode instead of advancing to the next field when pressing <TAB>.