Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Logos LGSNew to Visual Studio Code? Get it now.
Logos LGS

Logos LGS

Isaac Hayab

|
4 installs
| (0) | Free
Syntax highlighting for the Logos scripting languag
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Logos LGS — Language Support

Professional syntax highlighting for the Logos scripting language in VSCode.

Version Installs Rating License: MIT


Features

  • ✨ Syntax highlighting for .lgs files with comprehensive keyword coverage
  • 📝 String interpolation support (${} syntax highlighting)
  • 🎨 Semantic distinction of keywords, types, builtins, strings, numbers, operators, and comments
  • 🎯 Result pattern highlighting with .ok, .value, .error fields colored distinctly
  • 🔧 Function definitions and calls distinguished from variables
  • 📋 Auto-closing pairs for brackets, parentheses, quotes, and braces
  • 💬 Smart comment support with line comment configuration

Example Code

// fetch some data with error handling
fn fetchData(url) {
  let res = httpGet(url)
  if res.ok {
    let data = parseJson(res.value.body)
    print("Data: ${data["message"]}")
  } else {
    print("Error: ${res.error}")
  }
}

spawn {
  fetchData("https://api.example.com/data")
}

Installation

From the Marketplace

  1. Open VSCode
  2. Go to the Extensions panel (Ctrl+Shift+X)
  3. Search for Logos LGS
  4. Click Install

Or install directly via the command line:

code --install-extension isaachayb.logos-lgs

Manual (.vsix)

Download the latest .vsix from the Releases page, then:

code --install-extension logos-lgs-0.0.1.vsix

Or via the VSCode UI: Extensions panel → ... menu → Install from VSIX...


Language Syntax Overview

Logos is a lightweight scripting language with a focus on simplicity and result-based error handling. Here's a quick reference:

Variables

let name = "Logos"
let count = 42
let pi = 3.14
let active = true

Functions

fn greet(name) {
  return "Hello, " + name
}

Control Flow

if count > 10 {
  print("big")
} else {
  print("small")
}

for item in items {
  print(item)
}

Result-Based Error Handling

Logos uses a result pattern instead of exceptions. Functions return an object with .ok, .value, and .error fields:


let res = httpGet("https://api.example.com/data")
if res.ok {
  print(res.value.body)
} else {
  print("Failed: " + res.error)
}

Concurrency

spawn {
  let res = httpGet("https://api.example.com")
  print(res.value.body)
}

Built-in Functions

Function Description
print(value) Print to stdout
httpGet(url) HTTP GET request

| httpPost(url, body) | HTTP POST request | | parseJson(str) | Parse JSON string | | readFile(path) | Read file contents | | writeFile(path, data) | Write to file | | exit(code) | Exit the program |


Syntax Coverage

This extension provides complete syntax highlighting for Logos constructs:

Construct Example Highlighted
Keywords let, fn, if, else, for, return, spawn ✅
Types int, float, string, bool ✅
Builtins print, httpGet, parseJson, readFile, prompt ✅
Result fields .ok, .value, .error ✅
Strings "hello world" ✅
String interpolation "Hello, ${name}" ✅
Numbers 42, 3.14 ✅
Booleans true, false, null ✅
Operators ==, !=, +, &&, \|\| ✅
Comments // line comment ✅
Functions fn greet(name) { ... } ✅

Requirements

  • VSCode ^1.110.0 or later
  • Files must use the .lgs extension for automatic language detection

Roadmap

  • [x] String interpolation (${}) highlighting
  • [ ] Better scope awareness for nested blocks
  • [ ] Enhanced bracket matching visualization
  • [ ] Neovim Tree-sitter grammar
  • [ ] LSP support (go-to-definition, hover docs, diagnostics)
  • [ ] Code snippets and templates

Project Structure

logos-syntax-highlighting/
├── syntaxes/
│   └── logos.tmLanguage.json      # TextMate grammar definition
├── language-configuration.json     # Language config (comments, brackets)
├── package.json                    # VSCode extension manifest
├── main.lgs                        # Example Logos script
├── README.md                       # This file
├── CHANGELOG.md                    # Version history
└── LICENSE                         # MIT License

Development

Setup

git clone https://github.com/naiih001/logos-lgs
cd logos-lgs

Testing

Press F5 in VSCode to launch a development window with the extension loaded. This allows you to test syntax highlighting in real-time.

Making Changes

Grammar rules live in syntaxes/logos.tmLanguage.json. Refer to the TextMate grammar reference when adding new patterns.

Configuration for comment behavior and bracket matching is in language-configuration.json.

Please open an issue before submitting large changes to discuss your ideas first.


Troubleshooting

Syntax not highlighting correctly?

  1. Ensure your file has the .lgs extension
  2. Set the language to "Logos" if VSCode doesn't auto-detect it (Ctrl+K Ctrl+M)
  3. Check if syntax rules need updating in syntaxes/logos.tmLanguage.json

File not recognized?

Reload the VSCode window (Ctrl+Shift+P → "Developer: Reload Window") after installing or updating the extension.


Related

  • Logos Language — the language this extension supports
  • TextMate Grammars — syntax highlighting specification
  • VSCode Extension API — extension development documentation

License

MIT © isaachayb

For details, see LICENSE

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