Hadid Programming Language for VS Code
Official Visual Studio Code extension for Hadid (v0.8.0) by Digital HAT Yazılım — a bilingual (Turkish & English) systems and backend programming language featuring dual interpreter + native C17 code generation, SQLite persistence, Argon2id authentication, and built-in HTTP web servers.
Features
- Official Hadid File Icons
- Custom light and dark geometric H icons for
.had files (automatically shown in editor tabs and language-icon-aware themes).
- Dedicated Hadid File Icons theme (
Preferences: File Icon Theme -> Hadid File Icons) with custom icons for .had, hadid.toml, and hadid.lock.
- Complete v0.8 Bilingual Syntax Highlighting (TR / EN)
- Highlights every Turkish and English keyword (
fonksiyon/fn, eslestir/match, eger/if, degilse/else, dongu/for, iken/while, yapi/struct, sayim/enum, aktar/import).
- Distinct coloring for generic types (
Option<T>, Result<T, E>, List<T>), enum variants (Some, None, Ok, Err, Empty), => arrows, escape sequences, Turkish UTF-8 identifiers, and all standard library builtins (text_*/metin_*, file_*/dosya_*, json_*, web_*/istek_*/yanit_*, db_*/vt_*, auth_*/kimlik_*).
- Automatic Code Formatting (
Format Document & Format on Save)
- Powered by
hadid lsp (textDocument/formatting) and hadid fmt, preserving generic angle brackets (Result<Option<i32>, string>), match arrows (=>), and multi-line block comments (/* ... */).
- Pre-configured as the default formatter for
[hadid] files.
- Language Server Protocol (LSP) IntelliSense
- Real-time compiler diagnostics (lexer, parser, and semantic type checker).
- Hover documentation for builtins and user declarations.
- Go to Definition (same-file and cross-file imports).
- Autocompletion for keywords, types, standard builtins, and user symbols.
- Outline & Breadcrumbs (
textDocument/documentSymbol).
- One-Click Commands & Bilingual Snippets
- ▶ Run Current File button in the editor title bar, plus Build Native Binary, Check Current File, Run Project Tests, Create New Project (TR/EN), and Restart Language Server.
- Snippets in both English and Turkish:
fn, fonksiyon, struct, yapi, enum, sayim, matchr, eslestirr, matcho, eslestiro, for, dongu, webapi, sqlite, htest.
Quick Setup
Add this to your VS Code settings.json to format .had files automatically whenever you press Cmd+S / Ctrl+S:
{
"[hadid]": {
"editor.defaultFormatter": "digitalhat.hadid-lang",
"editor.formatOnSave": true
}
}
If hadid is already in your PATH, ~/.local/bin/hadid, /usr/local/bin/hadid, /opt/homebrew/bin/hadid, or ./build/hadid inside your open workspace, the extension discovers it automatically. Otherwise, set:
{
"hadid.lsp.command": "/path/to/hadid"
}
3. Activate Hadid File Icons (Optional)
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) -> Preferences: File Icon Theme -> Hadid File Icons to display Hadid icons on .had, hadid.toml, and hadid.lock in the Explorer sidebar.
Packaging & Publishing
Local VSIX Build & Install
From the Hadid repository root:
make vscode-ext
code --install-extension build/hadid-lang-0.8.0.vsix --force
Publishing to Visual Studio Marketplace & Open VSX
cd tools/vscode-hadid
npm ci
npm run package-build
# Visual Studio Marketplace (requires VSCE_PAT)
npx @vscode/vsce publish
# Open VSX Registry (for Cursor, VSCodium, Antigravity, etc. — requires OVSX_PAT)
npx ovsx publish ../../build/hadid-lang-0.8.0.vsix
| |