- Full syzlang grammar —
include,incdir,define,meta,resource,typealiases/templates, struct/union blocks, flags, syscall definitions with variants - Syzconst grammar — extracted constants (
.const,.txt.const) and warnings (.txt.warn) - Language server — go-to-definition, find references, hover info, autocomplete, document symbols, and diagnostics
- Dark and light themes — optimized color palettes for Dark+, Dark Modern, Light+, and Light Modern
- Fully customizable — every token color is overridable via
editor.tokenColorCustomizations
| Language ID | Extensions / Patterns | Description |
|---|---|---|
syzlang |
.syz, sys/**/*.txt |
Syscall descriptions |
syzconst |
.const, .txt.const, .txt.warn |
Extracted constants and warnings |
Note: Syzkaller stores descriptions as plain
.txtfiles undersys/<os>/. The extension auto-associates**/sys/**/*.txtwith syzlang viafiles.associations. You can adjust or disable this in yoursettings.json.
- Install from the VS Code Marketplace or search "Syzlang" in the Extensions panel
- Open any
.syzfile or a syzkallersys/directory - Syntax highlighting, hover info, and diagnostics activate automatically
| Setting | Default | Description |
|---|---|---|
syzlang.trace.server |
off |
Trace communication between VS Code and the language server |
syzlang.diagnostics.enable |
true |
Enable diagnostics (duplicate definitions, undefined type references) |
syzlang.diagnostics.undefinedTypes |
info |
Severity for undefined type references (error, warning, info, off) |
Use these scopes to customize colors in editor.tokenColorCustomizations.textMateRules:
| Scope | Highlights |
|---|---|
keyword.control.directive.syzlang |
include, incdir, define, meta |
keyword.control.declaration.syzlang |
resource, type |
keyword.control.direction.syzlang |
in, out, inout |
keyword.control.conditional.syzlang |
if in field attributes |
support.type.builtin.syzlang |
Primitives: int32, string, void, ... |
support.type.constructor.syzlang |
Constructors: ptr, flags, array, len, fmt, ... |
entity.name.function.syscall.syzlang |
Syscall base names |
entity.name.tag.variant.syzlang |
Variant suffix after $ |
punctuation.separator.variant.syzlang |
The $ separator |
entity.name.type.struct.syzlang |
Struct names |
entity.name.type.union.syzlang |
Union names |
entity.name.type.resource.syzlang |
Resource names |
entity.name.type.alias.syzlang |
Type alias names |
entity.name.type.flags.syzlang |
Flag definition names |
entity.name.type.return.syzlang |
Syscall return types |
variable.parameter.syzlang |
Syscall parameter names |
variable.other.member.syzlang |
Struct/union field names |
variable.parameter.template.syzlang |
Template parameters |
variable.other.type.syzlang |
User-defined type references |
constant.other.caps.syzlang |
ALL_CAPS constants |
storage.modifier.optional.syzlang |
opt keyword |
storage.modifier.attribute.syzlang |
packed, varlen, align, size |
storage.modifier.call.syzlang |
disabled, no_generate, breaks_returns, ... |
| Scope | Highlights |
|---|---|
variable.other.constant.syzconst |
Constant names |
constant.numeric.syzconst |
Numeric values |
keyword.control.arches.syzconst |
arches keyword |
support.constant.arch.syzconst |
Architecture names (386, amd64, ...) |
markup.deleted.syzconst |
Warning/diagnostic keys |
keyword.other.syzconst |
syz, kernel in warning lines |
entity.name.type.syzconst |
Type references in warning lines |
Override any color in your settings.json:
{
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.name.function.syscall.syzlang",
"settings": { "foreground": "#FFD700", "fontStyle": "bold" }
}
]
}
}The extension registers **/sys/**/*.txt as syzlang by default. If this conflicts with other .txt files in your workspace, narrow or override it:
{
"files.associations": {
"**/sys/**/*.txt": "syzlang",
"**/my-other-dir/**/*.txt": "plaintext"
}
}make install # install dependencies
make build # build extension
make lint # type-check + eslint
make format # format with prettier
make package # build + package .vsix
make ci # full CI pipeline- syzkaller — the kernel fuzzer that uses syzlang
- Syscall descriptions syntax — official syzlang documentation
- syzlang-vscode-ext — an earlier syzlang highlighter