A VS Code extension that integrates the Andromeda Language Server for comprehensive JavaScript and TypeScript development support.
- ๐ Real-time Diagnostics - Live error reporting with comprehensive linting rules
- โก Enhanced Auto-completion - Context-aware completions for:
- Andromeda APIs (file system, environment, process operations)
- Web APIs (Canvas, Crypto, Performance, Storage, Timers)
- Console methods with rich descriptions
- Database operations (SQLite)
- ๐ ๏ธ Code Actions & Quick Fixes - Auto-fix capabilities for common issues
- ๐ Document Formatting - Built-in code formatting support
- ๐ก Hover Information - Rich documentation and type information on hover
- โ๏ธ Configurable Diagnostics - Run on type, save, or never
- ๐ Multiple File Format Support -
.js,.jsx,.ts,.tsx,.mjs,.cjs - ๐ฏ Advanced Linting Rules including:
- Empty statement detection
- Variable usage validation
- Unreachable code detection
- Camelcase naming enforcement
- Console usage warnings
- Debugger statement detection
- Type checking for TypeScript
- And many more...
- Andromeda v0.1.0-draft14 or higher
- VS Code 1.74.0 or higher
- Clone this repository
- Run
npm installto install dependencies - Run
npm run compileto build the extension - Press F5 to launch a new Extension Development Host window
Make sure you have Andromeda installed:
# Install from source (requires Rust)
git clone https://github.com/tryandromeda/andromeda
cd andromeda
cargo install --path cli
# Or install from crates.io (when available)
cargo install --git https://github.com/tryandromeda/andromedaThe extension can be configured through VS Code settings:
{
"andromeda.enable": true,
"andromeda.run": "onType",
"andromeda.configPath": null,
"andromeda.unusedDisableDirectives": "allow",
"andromeda.executablePath": "andromeda",
"andromeda.trace.server": "off",
"andromeda.format.enable": true,
"andromeda.codeAction.autoFix.enable": true,
"andromeda.completion.enable": true,
"andromeda.hover.enable": true
}andromeda.enable: Enable/disable the Andromeda language serverandromeda.run: When to run diagnostics (onType,onSave,never)andromeda.configPath: Path to custom Andromeda configuration fileandromeda.unusedDisableDirectives: Handle unused disable directives (allow,warn,error)andromeda.executablePath: Path to the Andromeda executable (default:andromeda)andromeda.trace.server: Enable LSP communication tracing for debugging
andromeda.format.enable: Enable code formatting (default:true)andromeda.codeAction.autoFix.enable: Enable auto-fix code actions (default:true)andromeda.completion.enable: Enable enhanced completions (default:true)andromeda.hover.enable: Enable hover information (default:true)
Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Andromeda: Restart Language Server - Restart the language server
- Andromeda: Show Output - Show the language server output channel
- Andromeda: Apply Auto Fix - Apply auto-fixes for the current file
- Andromeda: Fix All Auto-fixable Problems - Fix all auto-fixable problems in the current file
- Andromeda: Format Document - Format the current document
- Install the extension and ensure Andromeda is in your PATH
- Open a JavaScript or TypeScript file
- The extension will automatically start the language server
- Enjoy real-time diagnostics, enhanced completions, and more!
The extension provides rich completions for various APIs:
// Andromeda File System APIs
Andromeda.readTextFileSync| // ๐ Reads a text file synchronously
Andromeda.writeFileSync| // ๐พ Writes binary data to a file
// Web APIs
crypto.subtle.digest| // ๐ Computes a digest of the given data
performance.now| // โฑ๏ธ High-precision timing
localStorage.setItem| // ๐พ Stores data in local storage
// Canvas APIs (when working with canvas)
ctx.fillRect| // ๐ณ Draws a filled rectangle
ctx.beginPath| // ๐ฏ Begins a new pathThe extension can automatically fix common issues:
- Convert
vardeclarations toletorconst - Remove unused variables
- Fix camelCase naming issues
- Remove empty statements
- And more...
- JavaScript:
.js,.mjs,.cjs - JSX:
.jsx - TypeScript:
.ts - TSX:
.tsx
- Check Andromeda installation:
andromeda --version - Check the Output panel: View โ Output โ "Andromeda Language Server"
- Restart the language server: Command Palette โ "Andromeda: Restart Language Server"
- Check executable path: Ensure
andromeda.executablePathis correctly set
- Check run mode: Verify your
andromeda.runsetting - File type support: Ensure the file type is supported
- Configuration conflicts: Check for conflicting configuration files
- Enable diagnostics: Ensure
andromeda.enableis set totrue
- Feature enabled: Check
andromeda.completion.enablesetting - Trigger characters: Try typing
.afterAndromeda,console,crypto, etc. - Server status: Check if the language server is running properly
- Feature enabled: Check
andromeda.format.enablesetting - File saved: Ensure the file is saved before formatting
- Syntax errors: Fix any syntax errors that might prevent formatting
npm install
npm run compile- Open this folder in VS Code
- Press F5 to launch Extension Development Host
- Test the extension in the new window
- Check the Debug Console for any issues
npm run lint # Check for TypeScript issues
npm run watch # Watch for changes during development- โจ Enhanced Completions: Context-aware completions for Andromeda and Web APIs
- ๐ ๏ธ Code Actions: Auto-fix capabilities with quick fixes for common issues
- ๐ Formatting Support: Built-in document and range formatting
- ๐ก Hover Information: Rich documentation on hover (when available)
- โ๏ธ Improved Configuration: More granular control over features
- ๐ฏ Better Diagnostics: Enhanced linting rules with clearer error messages
- ๐ฑ๏ธ Context Menu Integration: Right-click to access auto-fix options
We welcome contributions! Please see the main Andromeda repository for contribution guidelines.
Mozilla Public License Version 2.0 - see LICENSE.md for details.