Real-time Diagnostics
See errors and warnings as you type, before compilation.
Zeus includes a built-in Language Server Protocol (LSP) implementation that provides IDE features for any compatible editor.
Real-time Diagnostics
See errors and warnings as you type, before compilation.
Syntax Highlighting
Full syntax highlighting for Zeus code.
Code Completion
Intelligent suggestions for keywords, types, and symbols.
Unused Warnings
Warnings for unused variables, functions, and classes.
Formatting
Format Document and format-on-save, powered by the built-in formatter.
The language server reports errors in real-time:
Example error:
function main(): i32 { let x: i32 = "hello"; // ❌ Error: type 'string' is not assignable to 'i32' return x;}Press Ctrl+Space (or Cmd+Space on Mac) to see suggestions:
Keywords:
if, else, while, returnlet, const, function, classpublic, private, export, importTypes:
i8, i16, i32, i64, u8, u16, u32, u64f32, f64boolean, voidSymbols:
The server warns about declarations that are never used:
function main(): i32 { let unused: i32 = 5; // ⚠️ Warning: 'unused' is declared but never used let used: i32 = 10; return used;}The server implements textDocument/formatting using the built-in
formatter, so Format Document (Shift+Alt+F) and
format-on-save work in any LSP client. The VS Code extension enables
format-on-save for .zs files by default; disable it per-workspace with:
"[zeus]": { "editor.formatOnSave": false }The server never returns an edit for code that doesn’t parse, so a file with errors is left untouched.
.zs fileFor other editors, run the server directly:
zeus lsp --stdioThe server communicates via standard input/output using the LSP protocol.
See the full IDE Setup guide.
Using nvim-lspconfig:
local lspconfig = require('lspconfig')local configs = require('lspconfig.configs')
configs.zeus = { default_config = { cmd = { 'zeus', 'lsp', '--stdio' }, filetypes = { 'zeus' }, root_dir = lspconfig.util.find_git_ancestor, },}
lspconfig.zeus.setup{}Using lsp-mode:
(lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection '("zeus" "lsp" "--stdio")) :major-modes '(zeus-mode) :server-id 'zeus-ls))Using LSP package:
{ "clients": { "zeus": { "command": ["zeus", "lsp", "--stdio"], "selector": "source.zeus" } }}Hover over symbols to see:
Jump to where a symbol is defined:
Cmd+Click on a symbolFind all usages of a symbol throughout the project.
Safely rename variables, functions, or classes across the entire codebase.
Outline view showing:
Parameter hints while typing function calls:
add(|) // Shows: add(a: i32, b: i32): i32Now implemented — see Formatting above.
Ensure Zeus is installed and in your PATH:
which zeuszeus --versionCheck the path in your editor configuration
Look for errors in the editor’s output panel
.zs extensionps aux | grep "zeus lsp"The language server recompiles on each change. For very large files, there may be a delay. This will be optimized in future releases.
The Zeus LSP implementation:
All of this happens on every keystroke, providing instant feedback.