Skip to content

Quick start: Scheme (stdio)

rhcher edited this page Dec 1, 2021 · 5 revisions

MIT/GNU Scheme is an implementation of the Scheme programming language, providing an interpreter, compiler, source-code debugger, integrated Emacs-like editor, and a large runtime library. MIT/GNU Scheme is best suited to programming large applications with a rapid development cycle.

Conjure starts an MIT Scheme REPL within Neovim when you first open a Scheme file. You can change which Scheme REPL is started by adjusting the the g:conjure#client#scheme#stdio#command configuration, it defaults to "mit-scheme".

If you change the REPL to a different scheme implementation you’ll probably also need to change the g:conjure#client#scheme#stdio#prompt_pattern accordingly. It’s a Lua pattern that should match the REPL prompt string that signifies the REPL is ready for more input.

You should be able to evaluate files and forms as you would with other Conjure supported languages right away.

Prerequisites

Open and edit!

You should now be able to open any .scm file and evaluate as you would normally.

If you’re unsure how to evaluate things with Conjure, please refer to :help conjure, :help conjure-client-scheme-stdio and :ConjureSchool (an interactive tutorial).

Chicken Scheme

To use the Scheme client with Chicken scheme you need to set the following command string and prompt pattern:

let g:conjure#client#scheme#stdio#command = "csi -quiet -:c"
let g:conjure#client#scheme#stdio#prompt_pattern = "\n-#;%d-> "

Chez Scheme

To use the Scheme client with Chez Scheme you need to set the following command string and prompt pattern:

let g:conjure#client#scheme#stdio#command = "petite"
let g:conjure#client#scheme#stdio#prompt_pattern = "> $?"