Skip to content

Quick start: Fennel (Aniseed)

Oliver Caldwell edited this page Feb 25, 2021 · 3 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 is written in Fennel and compiled to Lua ahead of time with Aniseed. This means you can evaluate Fennel out of the box within Neovim’s internal LuaJIT support.

You can use Aniseed to configure your own Neovim via Fennel based dotfiles or write your own plugins in Fennel. You could even write a language client or plugin that requires Conjure’s Lua modules and adds features or builds on top of them!

Prerequisites

  1. Install the latest Neovim.

  2. Ensure your Neovim supports the fennel filetype. You may need to find a plugin for this!

  3. Install the Conjure plugin.

  4. Optionally install the Aniseed plugin if you’d like to use a specific version for evaluations.

To configure Conjure to use your chosen Aniseed version for Fennel evaluation instead of the one that comes built in you can set the following.

let g:conjure#client#fennel#aniseed#aniseed_module_prefix = "aniseed."

Open and edit!

You should now be able to open any .fnl file and evaluate as you would normally. The file should use Aniseed’s module macros (:help aniseed-macros) to ensure that evaluations take place within the right module context.

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