Official Visual Studio Code language support and TextMate-compatible syntax grammar for the Semantic Programming Language.
The extension registers Semantic as a language in Visual Studio Code and associates these official formats:
| Extension | Role | Text/Binary | Syntax highlighting |
|---|---|---|---|
.se |
Primary Semantic source/transport format | UTF-8 text | Yes |
.sp |
Legacy/alternative readable Semantic transport | UTF-8 text | Yes |
.spz |
Lossless block-compressed Semantic transport | Binary | No |
.spz is registered with VS Code so files are associated with the Semantic language. Because .spz contains compressed binary data, the TextMate grammar intentionally does not attempt to tokenize its contents.
- Semantic language registration in VS Code
.se,.sp, and.spzfile association- TextMate syntax highlighting for
.seand.sp #line comments- bracket and quote auto-closing
- bracket and quote surrounding pairs
- highlighting for Semantic headers, sections, references, constants, numbers, field keys, and operators
The canonical readable envelope starts with either:
se 1
program {
schema = 1
}
or:
sp 1
program {
schema = 1
}
source.semantic
The grammar supports:
#commentsse 1/sp 1headersprogram,object,list,ranges- native Semantic sections such as
types,scopes,nodes, andrelations - quoted strings and escapes
- numbers, booleans,
null, andunknown - Semantic references such as
%12and@3 - relation arrows (
->) - compact and readable field assignments
Run the metadata/grammar validation with:
npm testTo test the extension locally in VS Code, open this repository in VS Code and press F5 to launch an Extension Development Host.
To create a VSIX package, install Microsoft's VS Code extension packaging tool and run:
npx @vscode/vsce packagePreparation material is under linguist/.
The recommended Linguist submission requests:
.seas the primary extension.spas a secondary extension shared with SourcePawn, with a content heuristic.spzdocumented as an official Semantic binary transport, but not registered as a source-code extension because GitHub Linguist classifies text source and.spzis compressed binary data
If maintainers explicitly agree to index .spz as an extension, linguist/languages-with-spz.yml contains the requested all-format variant.
The grammar is based on the canonical Semantic serializer/parser:
- Semantic Programming Language main repository
- Code Transpiler
internal/backend/semantic_sp.go docs/SP_LANGUAGE.mddocs/SFPC.md
MIT.