Logos LGS — Language Support
Features
Example Code
InstallationFrom the Marketplace
Or install directly via the command line:
Manual (
|
| 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.0or later - Files must use the
.lgsextension 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?
- Ensure your file has the
.lgsextension - Set the language to "Logos" if VSCode doesn't auto-detect it (
Ctrl+K Ctrl+M) - 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