KoiLang VSCode Extension
Syntax highlighting for KoiLang, a markup language designed for narrative content.
Features
- Syntax highlighting for commands, text, and annotations
- Support for all parameter types: integers, floats, strings, booleans, literals
- Composite parameters with named values, lists, and dictionaries
- Escape sequences in strings (
\n, \t, \xHH, \uHHHH, \UHHHHHHHH)
- Line continuation with backslash
Supported File Types
| Threshold |
Extensions |
Description |
| 0 |
.koi0, .kcmd |
No prefix = command, # = annotation |
| 1 |
.koi, .ktxt |
# = command, ## = annotation (default) |
| 2 |
.koi2 |
## = command, ### = annotation |
Syntax Overview
Commands
#character Alice "Hello, world!"
#draw Line 2 pos(x: 0, y: 0) thickness(2) color(255, 255, 255)
Annotations
## This is a comment in threshold=1 files
### This is a comment in threshold=2 files
Parameters
- Integers:
123, 0xFF, 0b1010, 0o755
- Floats:
3.14, .5, 1e-3
- Strings:
"Hello\nWorld"
- Booleans:
true, false
- Literals:
identifier_name
- Composite:
key(value), list(a, b, c), dict(x: 1, y: 2)
Line Continuation
#draw Line 2 \
pos(x: 0, y: 0) \
thickness(2)
Installation
From VSIX
code --install-extension koilang-0.1.0.vsix
Development
- Open this folder in VSCode
- Press F5 to launch Extension Development Host
- Open a
.koi file to see syntax highlighting
License
MIT - See LICENSE for details.
| |