Home Docs Editors Emacs Emacs spork-lang 0.6.0
Install spork-mode and use nREPL evaluation, documentation, navigation, inspection, and completion.
spork-mode is an Emacs major mode for Spork with nREPL integration. It provides interactive evaluation, navigation, completion, and inspection for Spork source.
Requirements# Emacs 26.1 or later Spork CLI installed (spork command available) Installation# Manual# Add the checked-out spork-lang/editors/emacs directory to your Emacs load path, or copy spork-mode.el into an existing load-path directory. Load the mode from your init file: ( add-to-list 'load-path "/path/to/spork-lang/editors/emacs" )
( require 'spork-mode )
use-package# ( use-package spork-mode
:load-path "/path/to/spork-lang/editors/emacs"
:mode "\\.spork\\'" )
Features# Core Features# Syntax highlighting for Spork code Lisp-style indentation and navigation Start/stop nREPL server Connect to running nREPL server Evaluate forms, regions, and buffers Load files into the REPL REPL buffer with history Auto-completion Pretty-printed results Runtime Features# Documentation lookup with rich metadata (type, arglists, protocols) Macroexpansion - see what your macros expand to Jump to definition (M-.) with xref integration Interactive value inspector - drill into data structures Protocol browser - list all registered protocols Usage# Getting Started# Open a .spork file (spork-mode activates automatically) Start the nREPL server with M-x spork-jack-in or C-c C-j Start evaluating code! Alternatively, connect to an existing nREPL server:
M-x spork-connect
Key Bindings# Connection# Key Command Description C-c C-jspork-jack-inStart server and connect C-c C-qspork-quitQuit connection
Evaluation# Key Command Description C-c C-cspork-eval-current-sexpEval form at point C-c C-espork-eval-last-sexpEval form before point C-c C-rspork-eval-regionEval region C-c C-bspork-eval-bufferEval entire buffer C-c C-kspork-load-current-bufferLoad current buffer C-c C-zspork-switch-to-replSwitch to REPL buffer
Namespaces# Key Command Description C-c C-nspork-set-nsSwitch to namespace C-c nspork-current-nsShow current namespace C-c C-S-nspork-list-nsList all namespaces
Documentation & Info# Key Command Description C-c C-dspork-docShow documentation C-c ispork-infoShow rich info (type, arglists) C-c C-mspork-macroexpandMacroexpand form at point C-c C-tspork-transpileTranspile form to Python C-c C-pspork-list-protocolsList all protocols
Navigation# Key Command Description M-.spork-find-definitionJump to definition M-,spork-pop-find-definition-stackPop back from definition C-c gspork-find-definitionJump to definition (alt) C-c bspork-pop-find-definition-stackPop back (alt)
Inspector# Key Command Description C-c C-ispork-inspect-last-sexpInspect last sexp
In Inspector buffer:
Key Command Description nspork-inspector-nav-indexNavigate by index kspork-inspector-nav-keyNavigate by key bspork-inspector-backGo back qspork-inspector-quitQuit inspector RETspork-inspector-nav-indexNavigate by index
Customization# ;; REPL buffer name
( setq spork-repl-buffer "*spork-repl*" )
;; Default nREPL host
( setq spork-default-host "127.0.0.1" )
;; Default nREPL port
( setq spork-default-port 7888 )
;; Spork CLI command
( setq spork-command "spork" )
Source# The integration source is maintained in the spork-lang editor directory .