Editor Support
Sema has editor plugins for VS Code, Zed, IntelliJ IDEA, Neovim, Vim, Emacs, Helix, and Sublime Text. Each plugin lives in its own repository under the sema-lisp GitHub org and is published to that editor's registry.
Every plugin provides syntax highlighting for the full standard library, special forms, keyword and character literals, strings, numbers, comments, and LLM primitives. Most also wire up Sema's built-in developer tooling, which ships inside the sema binary:
- Language Server (LSP) (
sema lsp) — diagnostics, completion, hover, go-to-definition, references, rename, and code lenses. - Debugger (DAP) (
sema dap) — breakpoints, stepping, stack traces, and variable inspection. - MCP server (
sema mcp) — exposes Sema's tools (eval, build, notebook, docs) to editor AI agents.
| Editor | Repo | LSP | DAP | MCP | Highlighting |
|---|---|---|---|---|---|
| VS Code | vscode-sema | ✓ | ✓ | ✓ | TextMate |
| Zed | zed-sema | ✓ | ✓ | ✓ | tree-sitter |
| IntelliJ | intellij-sema | ✓ | ✓ | — | own lexer |
| Neovim | sema.nvim | ✓ | ✓* | — | tree-sitter |
| Vim | sema.vim | — | — | — | Vimscript |
| Emacs | emacs-sema | ✓ | — | — | font-lock |
| Helix | helix-sema | ✓ | ✓ | — | tree-sitter |
| Sublime Text | sublime-sema | ✓† | — | — | native syntax |
* Neovim DAP requires nvim-dap. † Sublime LSP requires the LSP package.
The features that shell out to sema (LSP, DAP, MCP, run/format) need the sema binary on your PATH — install it from sema-lang.com. Syntax highlighting and structural editing work without it.
VS Code
TextMate-grammar highlighting plus a full LSP client, a debug adapter that runs sema dap, an embedded notebook editor, and the Sema MCP server.
Install
From the VS Marketplace (VS Code) or Open VSX (VSCodium, Cursor, Windsurf, Gitpod, …):
ext install sema-lang.sema-langOr open the Extensions view (Cmd+Shift+X / Ctrl+Shift+X) and search for Sema Lisp. Point the extension at a specific binary with the sema.path setting if sema isn't on your PATH.
Features
- Syntax highlighting (special forms, builtins, LLM primitives, keywords, strings, numbers, regex/f-string literals)
- Bracket matching, auto-closing, and surrounding pairs for
(),[],{},"" - Comment toggling (Cmd+/ / Ctrl+/) and s-expression-aware indentation
- File icons for
.semaand.sema-nb - Language server — completions, hover, go-to-definition, references, rename, signature help, diagnostics, document symbols, and inline eval results
- Debugging — line/conditional breakpoints, step in/over/out, stack traces, variable and upvalue inspection, evaluate-on-hover, and an "Uncaught Exceptions" filter
- Notebooks — open a
.sema-nbfile to edit it in the embedded notebook UI with live cell execution - MCP server — registers
sema mcpin the Chat / agent view
Zed
Extension built on the shared tree-sitter-sema grammar, with LSP, DAP, runnables, and the Sema MCP context server.
Install
From inside Zed: Cmd+Shift+P → zed: extensions → search for Sema → Install. The grammar is fetched automatically at the commit pinned in extension.toml — no manual grammar setup.
To hack on it locally, clone zed-sema and use zed: install dev extension.
Features
- Syntax highlighting,
;line and#| … |#block comments (with TODO/FIXME injection), auto-pairs, and bracket matching - Code outline for top-level definitions and block forms
- 2-space auto-indent; Vim text objects (
af/iffor functions,ac/icfor agents/tools) - Runnables — a gutter ▶ to run the file or evaluate the selected form (see note below)
- Language server and debugging via
sema lsp/sema dap - MCP server — registers
sema mcpwith Zed's agent panel - Secret redaction for
llm/configure/llm/define-provider/llm/auto-configurearguments during screen sharing
Runnables need a one-time task
Zed doesn't let an extension bundle the task its ▶ button runs. Add it once via zed: open tasks (see the repo README for the tasks.json snippet).
IntelliJ IDEA
Full IDE support via LSP4IJ connecting to the Sema language server, plus a native debugger, notebook editor, and run configurations.
Requirements
- IntelliJ IDEA 2024.3+ (or any JetBrains IDE on build 243+)
- LSP4IJ — installed automatically as a plugin dependency
- The
semabinary onPATH, or set it under Settings → Languages & Frameworks → Sema
Install
From the IDE: Settings → Plugins → Marketplace, search for Sema. To build from source instead:
git clone https://github.com/sema-lisp/intellij-sema
cd intellij-sema
./gradlew buildPlugin
# Then: Settings → Plugins → ⚙️ → Install Plugin from Disk…
# and pick build/distributions/Sema-<version>.zipFeatures
- Syntax highlighting for
.sema,.semac, and.sema-nb, with a configurable color settings page - LSP (via LSP4IJ) — completion, hover, go-to-definition, references, rename, diagnostics, folding, inlay hints, document highlight, semantic tokens, call hierarchy, and clickable
import/loadlinks - Code lenses — evaluate top-level forms inline, plus a "Clear Sema Results" action
- Debugging — breakpoints, continue, step over/into/out, stack frames, scopes, and variable inspection
- Notebook editor for
.sema-nb— live cell evaluation in a JCEF view, run-all, open-in-browser, export to Markdown - Reformat Code, brace matching,
()/[]/{}auto-pairing, line/block commenting, Extend/Shrink Selection - Run configurations, custom file icons, and a configurable binary location
Neovim
Tree-sitter highlighting via nvim-treesitter, with a zero-config language server and optional DAP.
Install
With lazy.nvim:
{
"sema-lisp/sema.nvim",
ft = "sema",
dependencies = { "nvim-treesitter/nvim-treesitter" },
}With packer.nvim:
use({ "sema-lisp/sema.nvim", requires = { "nvim-treesitter/nvim-treesitter" } })Then run :TSInstall sema once to fetch and compile the pinned tree-sitter-sema grammar.
Features
- Filetype detection for
.sema - Tree-sitter highlighting (registers the parser + ships highlight queries)
- Language server (automatic) — on Neovim ≥ 0.11 the plugin registers and enables
sema lspwith no config (falls back to aFileTypeautocmd on older versions); nonvim-lspconfigneeded - Debugging (optional) — if
nvim-dapis installed, registers thesema dapadapter with a "Launch Sema file" configuration
Vim
Pure Vimscript plugin — syntax highlighting, filetype detection, and Lisp-aware editing with no runtime dependencies. Works in both Vim and Neovim.
Install
With vim-plug:
Plug 'sema-lisp/sema.vim'With a native package (Vim 8+ / Neovim):
git clone https://github.com/sema-lisp/sema.vim.git \
~/.vim/pack/plugins/start/sema.vimThe repo uses the standard ftdetect/, ftplugin/, syntax/ layout, so no runtimepath override is needed.
Features
- Automatic filetype detection for
.sema - Syntax highlighting — special forms, LLM/agent primitives, threading macros (
->,->>,as->), keyword/character literals, strings with escapes, and;/#| … |#comments - Lisp-aware editing —
lispmode with a curatedlispwordslist, 2-space indentation, andiskeywordextended for Sema identifiers commentstring/commentsconfigured for;
Emacs
Major mode with Lisp-aware indentation, REPL integration, imenu, and automatic eglot setup.
Install
From MELPA:
;; M-x package-install RET sema-mode
(use-package sema-mode
:ensure t
:mode "\\.sema\\'")On Emacs 29+ you can install straight from GitHub:
(use-package sema-mode
:vc (:url "https://github.com/sema-lisp/emacs-sema" :rev :newest)
:mode "\\.sema\\'")Doom Emacs — in packages.el:
(package! sema-mode
:recipe (:host github :repo "sema-lisp/emacs-sema"))Features
- Syntax highlighting (special forms,
llm/*/agent/*/conversation/*/tool/*primitives, keyword literals, booleans,nil, characters, numbers, strings, comments) - Lisp-aware indentation layered over
lisp-mode - REPL integration — send region, last sexp, or whole buffer to an inferior
semaREPL - imenu for functions, variables, macros, agents, tools, and record types
- Electric pairs for
(),[],{},"" - LSP — registers
sema lspwith eglot automatically (M-x eglot)
Key Bindings
| Key | Command | Description |
|---|---|---|
C-c C-z | sema-repl | Start or switch to the Sema REPL |
C-c C-e | sema-send-last-sexp | Send sexp before point to REPL |
C-c C-r | sema-send-region | Send selected region to REPL |
C-c C-b | sema-send-buffer | Send entire buffer to REPL |
C-c C-l | sema-run-file | Run current file with sema |
Helix
Tree-sitter highlighting via the dedicated tree-sitter-sema grammar, with the language server and debug adapter wired through languages.toml.
Install
Helix has no plugin system, so support is installed by placing the grammar queries in the runtime directory and merging the language config into ~/.config/helix/. Easiest is the install script:
git clone https://github.com/sema-lisp/helix-sema.git
cd helix-sema
./install.shThe script copies the queries, merges the language config idempotently, and builds the grammar. Verify with hx --health sema — it should report the language server, debug adapter, tree-sitter parser, and all queries as ✓. (Manual steps are in the repo README.)
Features
- Tree-sitter highlighting (grammar pinned to a release tag)
- Text objects —
maf/miffor functions,mac/micfor agent/tool definitions - Smart auto-pairs, 2-space indentation, and
;line comments - Language server (
sema lsp) via the[language-server.sema-lsp]block - Debugging (
sema dap) via the[language.debugger]block
Sublime Text
Native .sublime-syntax highlighting with build systems, symbol navigation, and optional LSP.
Install
Via Package Control: open the command palette → Package Control: Install Package → search for Sema. Manual install and per-OS Packages paths are in the repo README.
Features
- Syntax highlighting for
.sema(special forms, builtins, LLM primitives, keywords, strings, numbers, characters, quote operators) - Comment toggling (Cmd+/ / Ctrl+/) — line
;and block#| |# - Symbol navigation (Cmd+R) for
define,defun,defmacro,defagent,deftool, … - Build systems for running (
sema), formatting (sema fmt), and compiling (sema compile) - Language server (
sema lsp) via the LSP package — completions, hover, go-to-definition, references, rename, signature help, and diagnostics