Editor Support¶
Kaappi includes a Language Server Protocol (LSP) server for IDE integration.
VS Code¶
Install the Kaappi Scheme extension:
From source¶
Then press F5 in VS Code to launch an Extension Development Host, or copy the folder to ~/.vscode/extensions/.
Features¶
- Syntax highlighting for
.scm,.sld,.ss,.slsfiles - Auto-completion of all 600+ built-in procedures and your definitions
- Hover information showing type and arity of procedures
- Real-time diagnostics for parse and compile errors
- Bracket matching and auto-closing for parentheses
- Comment toggling — line (
;) and block (#| |#)
Configuration¶
| Setting | Default | Description |
|---|---|---|
kaappi.lspPath |
kaappi-lsp |
Path to the kaappi-lsp binary |
If kaappi-lsp is not in your PATH:
Language Server (kaappi-lsp)¶
The kaappi-lsp binary is included with Kaappi and built alongside the main interpreter. It communicates via JSON-RPC over stdin/stdout following the Language Server Protocol.
Capabilities¶
| Feature | Description |
|---|---|
| Diagnostics | Parse and compile errors on every file change |
| Completion | All global symbols, filtered by prefix at cursor |
| Hover | Type name and arity for any symbol |
| Document sync | Full text synchronization |
Using with other editors¶
Any editor with LSP support can use kaappi-lsp. Configure it as a stdio language server for .scm files:
Neovim (nvim-lspconfig):
vim.api.nvim_create_autocmd("FileType", {
pattern = "scheme",
callback = function()
vim.lsp.start({
name = "kaappi-lsp",
cmd = { "kaappi-lsp" },
})
end,
})
Emacs (eglot):
Helix (languages.toml):
[[language]]
name = "scheme"
language-servers = ["kaappi-lsp"]
[language-server.kaappi-lsp]
command = "kaappi-lsp"
Next: Tips