Coi Language Extension for Zed
February 22, 2026 ยท View on GitHub
Language support for Coi in the Zed editor.
Coi is a component-based language for building high-performance web applications that compile to WebAssembly.
Features
- Syntax highlighting
- Code folding
- Bracket matching
- Auto-indentation
- Symbol outline
- Text objects for navigation
- CSS injection in style blocks
Installation
From Zed Extensions
- Open Zed
- Open the Extensions panel (
Cmd+Shift+Xon macOS) - Search for "Coi"
- Click Install
Development Installation
- Clone this repository
- Open Zed
- Run the command
zed: install dev extension - Select the
zed-coidirectory
Supported File Types
.coi- Coi component files.d.coi- Coi definition files
Language Syntax
import "components/Button.coi";
component Counter {
mut int count = 0;
enum Direction { Up, Down }
def increment() : void {
count++;
}
def decrement() : void {
count--;
}
def label(Direction dir) : string {
return match (dir) {
Direction::Up => "+";
Direction::Down => "-";
};
}
style {
.counter {
display: flex;
align-items: center;
gap: 16px;
}
}
view {
<div class="counter">
<Button label={label(Direction::Down)} &onclick={decrement} />
<span>{count}</span>
<Button label={label(Direction::Up)} &onclick={increment} />
</div>
}
}
app {
root = Counter;
title = "Counter App";
}
Requirements
This extension requires the tree-sitter-coi grammar.
License
MIT