VS Code Extension

Syntax highlighting, code intelligence, and formatting for the Jda programming language.

Features

  • Syntax Highlighting – keywords, types, builtins, strings, numbers, comments
  • Go-to-Definition – jump to fn/struct/enum/const declarations
  • Hover Documentation – documentation for keywords and user-defined functions
  • Completion – keywords, symbols, and variables in scope
  • Document Symbols – outline view (fn, struct, enum, const, impl)
  • Formatting – 4-space indent normalization
  • Diagnostics – tab and trailing whitespace warnings

Installation

Option 1: Install from source (development)

# From the repo root
cd tools/vscode-jda
npm install
code --install-extension .
# Link the extension into VS Code's extensions directory
ln -s $(pwd)/tools/vscode-jda ~/.vscode/extensions/jda-lang

Then reload VS Code (Cmd+Shift+P -> “Developer: Reload Window”).

Configuration

SettingDefaultDescription
jda.lsp.enabledtrueEnable the Jda Language Server
jda.lsp.path""Path to jda-lsp.sh (auto-detected if empty)

The LSP server is auto-detected from tools/jda-lsp.sh in the workspace root. To override, set jda.lsp.path in your VS Code settings:

{
    "jda.lsp.path": "/path/to/jda-lang/tools/jda-lsp.sh"
}

Screenshots

The extension provides a rich editing experience for .jda files:

  • Syntax highlighting with distinct colors for keywords (fn, let, struct, impl, for, if, ret), types (i64, f64, &i8), builtins, string literals, and comments
  • Go-to-definition with Ctrl/Cmd+Click to jump to function, struct, enum, and const declarations
  • Hover documentation showing function signatures and doc comments on mouse hover
  • Auto-completion suggesting keywords, symbols, and variables currently in scope
  • Document outline in the sidebar showing all fn, struct, enum, const, and impl declarations
  • Format on save normalizing indentation to 4 spaces
  • Inline diagnostics warning about tabs and trailing whitespace

Requirements

  • Python 3.6+ (for the LSP server)
  • VS Code 1.75+

File Association

The extension automatically associates .jda files with the Jda language. No manual configuration needed.