Editors
Raku in the tools you already use. The same rakupp binary that
runs your programs checks them in your editor, runs them in a notebook and
hands them to an AI agent.
| Language server | How your editor talks to Raku++, and a live demo that shows every message as you type. |
| VS Code | The Raku++ extension from the Marketplace: mistakes underlined as you type, hover, completion, go to definition, syntax highlighting. |
| Emacs | The same, through eglot or lsp-mode, plus a Raku REPL in an Emacs buffer. |
| Neovim | The same language server, through Neovim's built-in LSP client. |
| WordPress | Code blocks in your posts that readers can edit and run. |
| Jupyter | Raku cells in JupyterLab, Notebook and VS Code notebooks. |
| Wolfram Language | Raku called from Mathematica and the Wolfram Engine, with values crossing as Wolfram expressions. |
| AI agents | Claude Code, Claude Desktop, Cursor and others run Raku and parse with grammars. |
The language server #
VS Code, Emacs and Neovim all get their Raku support from one place:
rakupp --lsp, a
Language Server Protocol
server built into rakupp. Its checks are the ones rakupp --lint
runs, so the editor and the command line always agree. It reads your file but never
runs it.
What it does
- Mistakes underlined as you type: syntax errors, undeclared variables, unused variables, redundant
return, unreachable code — each on the token it is about. - Hover: the declaration of the name under the cursor with its
#|comment, or for a built-in, its entry in the reference. - Completion: variables in scope, your subs, classes and methods, keywords, and every built-in sub and method.
- Go to definition: from a use of a name to where the file declares it.
How it works
The editor starts rakupp --lsp and the two talk in JSON messages over the
server's standard input and output. The editor sends the file, then each change, and
the server answers with the mistakes it found. Hover, completion and go to definition
are questions: the editor sends the cursor position and the server sends back the
answer.
rakupp --lsp$p.?
To use it in your editor, install rakupp and follow
the section for your editor below. Version 5.2.1, the current release, gives the
underlines. Hover, completion and go to definition arrive in the next release; until
then they need a build of the repository.
VS Code #
Raku++ (rakupp) is on the Visual Studio Marketplace. Install it, and VS Code highlights your Raku files and checks them as you type.
Or search for Raku++ in the Extensions view, or run:
code --install-extension DeepSoft.rakupp
The extension needs rakupp installed and starts it
for you. If VS Code cannot find it — likely when you start VS Code from the Dock or
Spotlight, which do not always see your shell's PATH — open your user
settings as JSON (Command Palette → Preferences: Open User Settings
(JSON)), add the path that command -v rakupp prints, and reload
the window:
"rakupp.path": "/absolute/path/to/rakupp"
It highlights .raku, .rakumod, .rakutest,
.p6 and .pm6 files.
Rather wire it up yourself? The extension is a thin client for
rakupp --lsp, so any generic LSP client
extension pointed at that command gets the same checks. To build the extension from
source instead, see
the full guide,
which also has what you should see, and troubleshooting.
Emacs #
Emacs 29 or later, which has eglot and use-package built in. Add this
to your init file (~/.emacs.d/init.el) and restart Emacs:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(use-package raku-mode
:ensure t
:custom (raku-exec-path "rakupp"))
(use-package eglot
:hook (raku-mode . eglot-ensure)
:config
(add-to-list 'eglot-server-programs '(raku-mode . ("rakupp" "--lsp"))))
You get highlighting and indentation from raku-mode, everything the
language server offers, and M-x run-raku: a REPL in a buffer that you
can send lines, regions and whole files to.
The Emacs guide
also covers lsp-mode. Never used Emacs?
Emacs 101
starts from installing it.
Neovim #
vim.lsp.start({
name = "rakupp",
cmd = { "rakupp", "--lsp" },
filetypes = { "raku" },
root_dir = vim.fn.getcwd(),
})
VS Code and Emacs are tested with the server; this Neovim setup is not yet.
Any other editor with an LSP client works the same way: the command is always
rakupp --lsp, over stdin and stdout.
WordPress #
The Raku Snippets plugin: install it, give a code
block the class raku, and readers can edit the program and run it in
the post. It runs in their browsers, so nothing runs on your server. For any other
site, one script tag does the same.
Jupyter #
rakupp --jupyter-install
jupyter lab
Then pick Raku++ in the launcher. One interpreter serves the whole notebook, so a sub defined in one cell is callable in the next. You need Jupyter itself, and nothing more on the Raku side. The Jupyter guide has the details.
Wolfram Language #
Raku from Mathematica or the free Wolfram Engine, version 13.3 or newer. The binding is in Wolfram's own Paclet Repository as RakuppLink, packaged by Anton Antonov. In a notebook:
PacletInstall["AntonAntonov/RakuppLink"]
Needs["AntonAntonov`RakuppLink`"]
RakuppEval["[*] 1..20"] (* 2432902008176640000, an exact Integer *)
Integers, strings and lists come back as their Wolfram counterparts, a hash as an
Association, and a Raku grammar's match as a nested expression. The paclet finds the Raku++ library beside
rakupp, so install rakupp first.
The binding's guide
has the rest, including using it straight from a checkout as RakuLang.wl.
AI agents #
rakupp --mcp serves the interpreter over the
Model Context Protocol. In Claude Code:
claude mcp add raku -- "$(command -v rakupp)" --mcp
The agent gets two tools: raku, which evaluates code in one session
that keeps its state between calls, and raku-parse, which compiles a
grammar and returns the match as JSON, or the line, column and rule where it failed.
The MCP guide
covers Claude Desktop and other clients.