Language support for Sema, a Lisp dialect with first-class LLM primitives.
Available on the VS Marketplace (VS Code) and Open VSX (VSCodium, Cursor, Windsurf, Gitpod, …):
ext install sema-lang.sema-lang
Or open the Extensions view (Cmd+Shift+X / Ctrl+Shift+X) and search for Sema Lisp.
- Syntax highlighting for
.semafiles (special forms, builtins, LLM primitives, keywords, strings, numbers, regex/f-string literals, and more) - Bracket matching, auto-closing, and surrounding pairs for
(),[],{}, and strings - Comment toggling with
Cmd+//Ctrl+/ - S-expression-aware indentation
- File icons for
.semaand.sema-nbfiles - Language server (
sema lsp): completions, hover docs, go-to-definition, references, rename, signature help, diagnostics, document symbols, and inline eval results - Debugging (
sema dap): step-through debugging with line/conditional breakpoints, step in/over/out, stack traces, variable and upvalue inspection, evaluate-on-hover, pause/continue, and an "Uncaught Exceptions" filter - Notebooks: open a
.sema-nbfile to edit it in the embedded Sema notebook UI with live cell execution - Command:
Sema: Clear Inline Resultsto clear inline eval decorations
The language server, debugger, and notebook features shell out to the sema binary. Install it from sema-lang.com and make sure it's on your PATH, or point the extension at it explicitly:
{
"sema.path": "/absolute/path/to/sema"
}Syntax highlighting and bracket/comment editing work without the binary.
The extension registers a debug adapter that launches sema dap — the stdio DAP server built into your sema binary. Add a launch configuration to .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "sema",
"request": "launch",
"name": "Debug Sema Program",
"program": "${file}",
"stopOnEntry": false
}
]
}Then press F5 in a .sema file.
Opening a .sema-nb file launches sema notebook serve for that file and embeds its web UI directly in the editor tab (live cell execution, one server per open notebook, stopped when you close the tab). It uses the same sema.path binary — no extra setup.
npm install
npm run compile
npx @vscode/vsce packageThis produces sema-<version>.vsix, which you can install with:
code --install-extension sema-<version>.vsix
- Open this repository in VS Code
- Run
npm install - Press
F5to launch an Extension Development Host - Open any
.semafile to see syntax highlighting and, ifsemais installed, the language server
- Website — sema-lang.com
- Playground — sema.run
- Documentation — sema-lang.com/docs
- Grammar — tree-sitter-sema
- Repository — sema-lisp/vscode-sema