Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Lynx Modeling Language ToolsNew to Visual Studio Code? Get it now.
Lynx Modeling Language Tools

Lynx Modeling Language Tools

lynx lang

|
3 installs
| (0) | Free
Syntax highlighting and basic editing features for the Lynx declarative modeling language.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lynx Language Support for VS Code

This extension provides syntax highlighting for the Lynx declarative modeling language.

Features

  • Syntax Highlighting: Complete syntax highlighting for Lynx language constructs
  • Language Configuration: Automatic bracket matching, indentation, and folding
  • Comment Support: Line comments (//) and block comments (/* */)

Supported Language Features

Functions (Yellow)

  • minimize, maximize - Optimization directives
  • filter, sum, firstTrue - Built-in functions
  • assert, Has - Utility functions

Keywords (Purple)

  • type, alias - Type declarations
  • objective, suchThat - Optimization parameters
  • true, false - Boolean literals

Types

  • Primitive Types: Bool, Integer, Float, String, int, float, str, bool
  • Logic Types: All, Any, Not, Exactly, AtLeast, AtMost, Free, Has
  • Custom Types: Capitalized identifiers (e.g., Color, Wheel, Price)

Operators

  • Range: .., ... (spread)
  • Assignment: =
  • Comparison: ==, !=, <=, >=, <, >
  • Arithmetic: +, -, *, /
  • Logical: &&, ||, !
  • Lambda: ->

Special Constructs

  • Attributes: @attributeName
  • Global Context: *
  • String Literals: "text"
  • Numbers: Integers and floats
  • Comments: // line comment and /* block comment */

Installation

  1. Copy the vscode-lynx-extension folder to your VS Code extensions directory:

    • Windows: %USERPROFILE%\\.vscode\\extensions\\
    • macOS: ~/.vscode/extensions/
    • Linux: ~/.vscode/extensions/
  2. Restart VS Code

  3. Open any .lynx file to see syntax highlighting in action

Example

// Type declaration with attributes
type Color : Bool {
    @tag : str,
}

// Variable assignment
red = Color(tag = "red")

// Range expression
z = -2..1

// Logic operation
constraint = All(x, y, z)

// Optimization
solution = minimize(
    objective = bike.totalPrice,
    suchThat = All(bike, constraint)
)

Development

To modify or extend the syntax highlighting:

  1. Edit syntaxes/lynx.tmLanguage.json for syntax rules
  2. Edit language-configuration.json for language behavior
  3. Update package.json for extension metadata

License

MIT - See LICENSE file for details

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft