Zith Language Support
Official VS Code extension for the Zith programming language — zith-lang.org.
The Language Server starts automatically when you open a .zith file — no manual setup required. It provides real-time diagnostics, code completion, and navigation as you type.
Features
🔌 LSP-Powered (Automatic)
- Diagnostics — Real-time compile errors and warnings surfaced inline as you type, with error codes and did-you-mean suggestions
- Code Completion — Overload-aware: shows every function overload with its full signature (
name(x: i32, y: f64) -> bool). Selecting one fills parameters as snippet placeholders (${1:param})
- Hover Information — Function signatures, parameter types, return types, and doc comments (
/// / /** */) on hover
- Go to Definition — Navigate to symbol definitions across files
- Find References — Locate all usages of a symbol
- Code Actions — Lightbulb quick-fix for undefined identifiers with one-click replacement suggestions
- Document Symbols — Outline view showing functions, structs, enums, traits, imports, and their children (parameters, fields, variants)
- Semantic Tokens — Accurate syntax highlighting driven by the compiler's own tokenizer
🎨 Editor Features
- Syntax Highlighting — Full TextMate grammar for keywords, operators, strings, numbers, and comments
- Code Snippets — Quick templates for
fn, struct, enum, component, trait, impl, if, for, while, match, let, return, import, and more
- Dark Color Theme — "Zith Dark" with a purple/red palette optimized for readability
How It Works
The extension bundles a native C++20 Language Server that embeds the Zith compiler as a library (zithcLib). When you open a .zith file, the LSP starts itself and communicates via JSON-RPC over stdin/stdout:
- Each keystroke triggers a fresh compilation of your file up to the
TypeChecked stage
- The compiler pipeline produces typed AST nodes, a symbol table with all declarations, and a list of diagnostics
- The LSP translates this data into standard LSP responses — completions, hover, diagnostics, etc.
This deep compiler integration means the LSP is always 100% accurate: it shows exactly what the compiler would see, with no guesswork or external configuration files.
Links
Developed by [GalaxyHaze / AboveHaze]
| |