GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — eclexia/editors/vscode at main · hyperpolymath/eclexia

Expand file tree

/

vscode

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

vscode

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
syntaxes
syntaxes
 
 
.vscodeignore
.vscodeignore
 
 
README.adoc
README.adoc
 
 
language-configuration.json
language-configuration.json
 
 
package.json
package.json
 
 

README.adoc

Outline

Eclexia for Visual Studio Code

Language support for Eclexia - the Economics-as-Code programming language with shadow pricing and resource awareness.

Features

Syntax Highlighting

  • Keywords: fn, let, if, match, resource, adaptive, shadow

  • Annotations: @requires, @provides, @builtin, @test, @bench

  • Dimensional literals: 10J, 5kWh, 100gCO2, 2.5kg·m²/s²

  • Comments: Line (//) and block (/* */)

Language Server Protocol (LSP)

  • Diagnostics: Real-time syntax and type errors

  • Hover: Symbol information with types and documentation

  • Go to Definition: Jump to symbol definitions

  • Find References: Find all usages of a symbol

  • Completion: Context-aware code completion with keywords

  • Document Symbols: Outline view of functions, types, and constants

  • Rename: Rename symbols across files

  • Formatting: Auto-format Eclexia code

Editor Features

  • Bracket matching: Auto-close {}, [], ()

  • Auto-indentation: Smart indentation based on braces

  • Comment toggling: Ctrl/+ for line comments

Requirements

  • Eclexia compiler: Install from eclexia repository

  • The eclexia binary must be in your PATH

Installation

From VSIX (Recommended)

  1. Download the latest .vsix file from releases

  2. In VSCode, press Ctrl+Shift+P and run “Extensions: Install from VSIX…”

  3. Select the downloaded .vsix file

From Source

cd editors/vscode
npm install
npm run package  # Creates eclexia-0.1.0.vsix
code --install-extension eclexia-0.1.0.vsix

Configuration

Configure the extension in VSCode settings (Ctrl,+):

{
  "eclexia.lsp.path": "eclexia",
  "eclexia.lsp.trace": "off"
}

Settings

  • eclexia.lsp.path: Path to the eclexia executable (default: "eclexia")

  • eclexia.lsp.trace: LSP trace level - "off", "messages", or "verbose" (default: "off")

Commands

  • Eclexia: Restart Server (Ctrl+Shift+P → “Eclexia: Restart Server”)

    • Restart the LSP server (useful after updating Eclexia)

Usage Example

Create a file example.ecl:

/// Calculate optimal algorithm based on carbon intensity.
adaptive fn optimize_sort(data: [Int]) -> [Int] {
    @requires(10kWh, 5s)
    @provides(sorted_data: [Int])

    fast: {
        // Use quicksort when carbon intensity is low
        quicksort(data)
    }

    slow: {
        // Use heapsort when carbon intensity is high (more energy-efficient)
        heapsort(data)
    }
}

resource energy {
    dimension: Energy,
    budget: 100kWh,
    shadow: compute_carbon_price(),
}

The extension will provide: - ✅ Syntax highlighting for adaptive, resource, @requires, @provides - ✅ Dimensional literal highlighting (10kWh, 5s, 100kWh) - ✅ Hover information on optimize_sort - ✅ Completion for keywords and symbols - ✅ Real-time diagnostics for errors

Troubleshooting

LSP Server Not Starting

  1. Check PATH: Verify eclexia is in your PATH:

    which eclexia  # Linux/Mac
    where eclexia  # Windows
  2. Check Version: Ensure you have a recent version:

    eclexia --version
  3. View Logs: Enable tracing in settings:

    {
      "eclexia.lsp.trace": "verbose"
    }

    Then check the “Eclexia Language Server” output panel.

  4. Restart Server: Run “Eclexia: Restart Server” command

Syntax Highlighting Not Working

  • Ensure the file has .ecl extension

  • Reload VSCode: Ctrl+Shift+P → “Developer: Reload Window”

License

MPL-2.0

Links

  • Eclexia Repository

  • Issue Tracker

  • Documentation

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.