Schema-first feature flags with a first-class editor experience.
more info on https://voidflag.vercel.app/
Full syntax highlighting for .vf schema files — keywords, types, values, strings, numbers, booleans, and comments all colored correctly.
// Feature flags for my app
flag darkMode {
type bool
fallback false
}
flag theme {
type string
fallback "light"
}
flag fontSize {
type number
fallback 16
}
Errors are underlined as you type — no need to run anything.
- Type mismatches (
type boolwith a string fallback) - Unknown fields inside a flag block
- Duplicate flag names
- Single quotes instead of double quotes
- Missing
typeorfallbackfields - Malformed values
Context-aware completions that only suggest what makes sense where your cursor is.
flagat the top leveltypeandfallbackinside a flag block — only the ones you haven't written yetbool,string,numberaftertypetrue,falseafterfallbackon a boolean flag
Hover over any keyword to see what it does.
Format your schema with Shift+Alt+F (or Format Document). The formatter is opinionated — one canonical style, no config needed.
Before:
flag darkMode{type bool
fallback false}
flag theme{type string
fallback "light"}
After:
flag darkMode {
type bool
fallback false
}
flag theme {
type string
fallback "light"
}
Formatting is skipped if the file has errors — fix them first.
{→{}"→""
Ctrl+/— toggle line comment (//)Shift+Alt+A— toggle block comment (/* */)
A .vf file is a list of flag declarations. Each flag has a name, a type, and a fallback value.
flag <name> {
type <bool | string | number>
fallback <value>
}
Types and their fallback values:
| Type | Fallback example |
|---|---|
bool |
true or false |
string |
"hello" |
number |
16 or 3.14 |
Comments:
// This is a line comment
/* This is a
block comment */
This extension pairs with the voidflag CLI. Once you've written your schema:
# Initialize a project
vf init
# Generate TypeScript output from schema.vf
vf generate src --lang tsThis produces a fully typed VoidClient setup ready to use in your app.
- VSCode
^1.82.0
No configuration required.
- Diagnostics show one error at a time (the parser stops at the first error)
- No support for multi-root workspaces yet
Initial release.
- Syntax highlighting
- Real-time diagnostics
- Context-aware IntelliSense
- Hover documentation
- Auto-formatting
- Auto-closing pairs
- Comment toggling
Issues and PRs welcome at github.com/C1ANCYSz/voidflag-vscode.
