Skip to content

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 .zs files
  • 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.

  1. Install the VS Code extension

    Install from VS Code Marketplace →

    Or search for “Zeus” in the VS Code Extensions panel (Cmd+Shift+X).

  2. Open a Zeus file

    Open any .zs file and the language server will start automatically.


Extension Discovery

The extension automatically searches for the Zeus binary in this order:

  1. Homebrew paths (macOS only)
    • /opt/homebrew/bin/zeus (Apple Silicon)
    • /usr/local/bin/zeus (Intel)
  2. Custom path from zeus.executablePath setting
  3. zeus from 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:

Terminal window
zeus lsp --stdio

The 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{}

Troubleshooting

Extension Not Starting

  1. Check that the zeus binary exists and is executable
  2. Verify the path in settings or PATH
  3. Check the VS Code Output panel → “Zeus Language Server”

No Diagnostics Appearing

  1. Make sure the file has a .zs extension
  2. Check that the language server is running (look for process zeus lsp)
  3. 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: