Zed
Zed is a high-performance code editor with native Sage support.
Installation
- Open Zed
- Press
Cmd+Shift+Xto open Extensions - Search for “Sage”
- Click Install
Alternatively, use the command palette (Cmd+Shift+P) and run “zed: install extension”.
Features
The Sage extension for Zed provides:
- Tree-sitter Highlighting — Fast, accurate syntax highlighting
- LSP Diagnostics — Real-time error reporting from the Sage compiler
- Auto-indentation — Smart indentation for agents, functions, and blocks
Requirements
The language server requires sage to be on your PATH. Install via:
# Homebrew (macOS)
brew install sagelang/sage/sage
# Cargo
cargo install sage-lang
# Quick install
curl -fsSL https://raw.githubusercontent.com/sagelang/sage/main/scripts/install.sh | bash
Troubleshooting
No syntax highlighting
If syntax highlighting isn’t working:
- Ensure the file has a
.sgextension - Check that the Sage extension is installed (Extensions → Installed)
- Try restarting Zed
No diagnostics
If you’re not seeing error diagnostics:
- Verify
sageis on your PATH:which sage - Check Zed logs:
Cmd+Shift+P→ “zed: open log” - Look for “sage-sense” or “language server” errors
Extension not loading
If the extension fails to load:
- Uninstall the extension
- Restart Zed
- Reinstall the extension