Syntax highlighting for InputLayer (.iql) files.
- Semantic syntax highlighting with head/body distinction in rules
- Schema column names highlighted differently from relation names
<-renders as←arrow with ligature fonts (Fira Code, JetBrains Mono, Cascadia Code)- Line (
//) and block (/* */) comment support with nesting - Comment toggling with
Cmd+//Ctrl+/ - Bracket matching, auto-closing pairs, bracket pair colorization
- File associations:
.iql
Rules distinguish head (definition) from body (references):
+triangle(A, B, C) <- edge(A, B), edge(B, C), edge(C, A)
│ │ │ │
│ │ │ └─ Variable (light blue)
│ │ └────── Body relation (teal/green - distinct from head)
│ └─────────────────── Variable (light blue)
└───────────────────────────── Head relation (yellow - definition)
Schema declarations distinguish column names from relation names:
+employee(emp_id: int, name: string, embedding: vector)
│ │ │
│ │ └─ Type (blue - keyword color)
│ └───────── Column name (member color - distinct from relation)
└─────────────────── Relation name (yellow - head)
The extension enables font ligatures for .iql files. With a ligature font, <- displays as ←:
Recommended fonts: Fira Code, JetBrains Mono, Cascadia Code, Iosevka
cp -r packages/inputlayer-vscode ~/.vscode/extensions/inputlayer-iql-0.1.0Then quit and reopen VS Code.
code --extensionDevelopmentPath=$(pwd)/packages/inputlayer-vscodeThe TextMate grammar (syntaxes/iql.tmLanguage.json) is derived from:
- PEG tokenizer:
src/syntax/iql.pest(token definitions) - Schema types:
src/schema/mod.rs(SchemaType::from_str) - Built-in functions:
src/vector_ops.rs
When adding new syntax constructs, update the TextMate grammar to match.
