Skip to content

Quick start: Fennel (stdio)

Oliver Caldwell edited this page Dec 30, 2020 · 5 revisions

Fennel is a programming language that brings together the speed, simplicity, and reach of Lua with the flexibility of a lisp syntax and macro system.

Conjure starts a Fennel REPL within Neovim when you first open a Fennel file.

The default Fennel filetype client is conjure.client.fennel.aniseed, to use this client instead you must override the configuration.

let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"

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

Warning! This is vanilla Fennel running in a regular Lua process. Unlike conjure.client.fennel.aniseed (the default) it does not come with Aniseed and it’s module macros. You’ll need to add your own standard library of choice, if you really need Aniseed’s macros then we can discuss this addition in an issue. Thanks!

Prerequisites

  1. Install the latest Neovim.

  2. Install the Conjure plugin.

  3. Install Fennel.

Open and edit!

You should now be able to open any .fnl 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-fennel-stdio and :ConjureSchool (an interactive tutorial).

Changing launch options

If you need to use different command line options with Fennel you can override the g:conjure#client#fennel#stdio#command option which defaults to "fennel". This can be a single string of space separated arguments or a list of strings (if you require spaces in some of the arguments).