Installation

Get Loon running on your machine in under a minute.

Install Loon

Run the install script to download the latest release for your platform.

SHELL
curl -fsSL https://loonlang.com/install.sh | sh

Supports macOS (ARM and Intel) and Linux (x86_64). Windows support is coming via WSL.

Verify Installation

Confirm Loon is installed and on your PATH.

SHELL
$ loon --version
loon 0.1.0

If the command is not found, you may need to add ~/.loon/bin to your PATH.

SHELL
export PATH="$HOME/.loon/bin:$PATH"

Editor Setup

VS Code

Install the Loon extension from the VS Code marketplace.

SHELL
code --install-extension loon-lang.loon-vscode

The extension provides syntax highlighting, diagnostics, hover types, go-to-definition, and completions.

Other Editors

Loon ships with a built-in language server. Point your editor's LSP client at the loon lsp command.

SHELL
loon lsp

For Neovim, add a lspconfig entry with cmd = { "loon", "lsp" } and filetypes = { "loon" }.

Your First Program

Create a file called hello.loon with the following contents.

hello.loon
[fn main []
  [println "Hello, world!"]]

[main]

Run it with the loon run command.

SHELL
$ loon run hello.loon
Hello, world!

Use loon run --watch to re-run automatically when the file changes.

What's Next

You're all set. Head to By Example for a cookbook of short programs, or jump into the language guide to learn the fundamentals.