IDE Setup
Zeus includes a Language Server Protocol (LSP) implementation that provides real-time IDE features. This guide shows you how to set up VS Code for the best development experience.
VS Code Extension
The Zeus VS Code extension provides:
- ✅ Syntax Highlighting — Full color coding for
.zsfiles - ✅ Real-time Diagnostics — Errors and warnings as you type
- ✅ Code Completion — Keywords, types, variables, and functions
- ✅ Error Underlining — Precise error locations
Installation
If you installed Zeus via Homebrew, no configuration is needed! The extension automatically detects the Homebrew installation.
-
Install the VS Code extension
Install from VS Code Marketplace →
Or search for “Zeus” in the VS Code Extensions panel (
Cmd+Shift+X). -
Open a Zeus file
Open any
.zsfile and the language server will start automatically.
If you built Zeus from source or installed it manually:
-
Build the Zeus compiler
Terminal window cd /path/to/zeusmake build -
Install extension dependencies
Terminal window cd zeus-vscodenpm installnpm run compile -
Configure the extension
Choose one of these options:
Option A: Add to PATH
Add Zeus to your shell’s PATH:
Terminal window # Add to ~/.zshrc or ~/.bashrcexport PATH="$HOME/path/to/zeus:$PATH"Then restart your terminal and launch VS Code.
Option B: Configure in VS Code
- Open VS Code Settings (
Cmd+,) - Search for “zeus”
- Set
zeus.executablePathto the full path:
{"zeus.executablePath": "/Users/yourname/path/to/zeus/zeus"} - Open VS Code Settings (
-
Launch the extension
- Open the
zeus-vscode/folder in VS Code - Press
F5to launch the Extension Development Host - Open any
.zsfile to activate the language server
- Open the
Extension Discovery
The extension automatically searches for the Zeus binary in this order:
- Homebrew paths (macOS only)
/opt/homebrew/bin/zeus(Apple Silicon)/usr/local/bin/zeus(Intel)
- Custom path from
zeus.executablePathsetting zeusfrom system PATH
Features in Action
Real-time Diagnostics
As you type, the extension shows errors immediately:
function main(): i32 { let x: i32 = "hello"; // Error: type 'string' is not assignable to 'i32' return x;}The error appears underlined in red with a descriptive message.
Code Completion
Start typing and press Ctrl+Space (or Cmd+Space on Mac) to see suggestions:
- Keywords:
let,const,function,class,if,while, etc. - Types:
i32,f64,boolean,void, etc. - Variables: All variables in the current scope
- Functions: Available functions with signatures
Unused Variable Warnings
The extension warns you about unused declarations:
function main(): i32 { let unused: i32 = 5; // Warning: 'unused' is declared but never used return 0;}Standalone LSP Server
If you use a different editor that supports LSP, you can run the language server standalone:
zeus lsp --stdioThe server uses standard input/output for LSP communication, making it compatible with any LSP-capable editor.
Editor Configuration Examples
require('lspconfig.configs').zeus = { default_config = { cmd = { 'zeus', 'lsp', '--stdio' }, filetypes = { 'zeus' }, root_dir = function(fname) return vim.fn.getcwd() end, },}require('lspconfig').zeus.setup{}(lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection '("zeus" "lsp" "--stdio")) :major-modes '(zeus-mode) :server-id 'zeus-ls))Troubleshooting
Extension Not Starting
- Check that the
zeusbinary exists and is executable - Verify the path in settings or PATH
- Check the VS Code Output panel → “Zeus Language Server”
No Diagnostics Appearing
- Make sure the file has a
.zsextension - Check that the language server is running (look for process
zeus lsp) - Try reloading VS Code (
Cmd+Shift+P→ “Developer: Reload Window”)
Slow Diagnostics
The language server recompiles on every change. For very large files, there may be a slight delay.
Next Steps
Now that your IDE is set up, dive into the language: