zed-eiwa
Eiwa language support for Zed.
Features
- Syntax highlighting for
.eifiles via tree-sitter-eiwa (a fork of tree-sitter-kotlin extended with Eiwa syntax) - ES6-style imports (
import { X } from "mod"),testandlibblocks, ternary expressions, union types (Int | Null), baretry/catch - Lambda-style
for(for (xs) { it * 2 }, incl. map-styleforas a value),leavewith a value, untypedcatch (e) - Composition type system:
type(generics,: Contract++ Skillheaders),contract,skill, first-classenum, type-bound companions (type Config { } object { },object S { } type (...) { }) - Varargs (
Int...), platform targets (object("windows") X,lib("posix") Y),ofmap pairs (["k" of "v"]) - Bracket matching and auto-closing pairs
- Comment toggling (
//and/* */) - Symbol outline (types, contracts, skills, enums, objects, libs, tests, functions, properties)
Language server (eiwa-lsp)
This extension registers the Eiwa-native language server (eiwa-lsp,
stdio LSP 3.17): diagnostics via eiwac check, hover, completion,
go-to-definition and document symbols for .ei files.
No setup needed. On first use the extension resolves the server in this order (no duplicate installs):
binary.pathfrom yoursettings.json, when set (absolute path; GUI apps don't inherit your shellPATH);eiwa-lspalready on yourPATH(e.g. installed viainstall.shor built from source) — withEIWACfrom your shell env, elseeiwacfromPATH, for diagnostics;- otherwise it downloads the latest
eiwa-lang/eiwarelease tarball for your platform into its work dir and runseiwa-lspfrom there, withEIWACpointed at the bundledeiwac.
{
"lsp": {
"eiwa-lsp": {
"binary": { "path": "/abs/path/to/eiwa-lsp" }
}
}
}Open a .ei file, save to see diagnostics.
Logs: palette → dev: open language server logs → eiwa-lsp.
Installing (dev extension)
- Clone this repository.
- In Zed, open the command palette and run
zed: install dev extension. - Select this directory (
zed-extension/).
Zed will download and compile the tree-sitter grammar on first install.