LFX Shader DSL Toolkit adds first-class editing, diagnostics, and preview tooling for .lfx files in Visual Studio Code.
It provides:
- syntax highlighting for LFX effect and library modules
- comment, bracket, auto-closing, folding, and indentation behavior
- snippets for common LFX constructs
- inline parse and semantic diagnostics by running the
lfxchecker - commands to validate files, inspect generated WGSL, and work with live preview tools
This extension is intended for authors working with the LFX language and toolchain. It focuses on fast feedback and solid authoring ergonomics without requiring a full language server.
Requirements
- Install the
lfxCLI and ensure it is available on yourPATH, or setlfx.pathto the executable location. - When developing inside the LFX source repository, the extension can fall back to
go run ./cmd/lfxif no installed binary is found.
Features
- Language registration for
*.lfx - TextMate-based syntax highlighting
- Comment and bracket handling from
language-configuration.json - Snippets for effect modules, library modules, params, timeline, stdlib imports, and common return shapes
- Inline diagnostics from
lfx check --json - Commands:
LFX: Check Current FileLFX: Check WorkspaceLFX: Show Generated WGSLLFX: Open Module GraphLFX: WebGPU ProbeLFX: Open Live PreviewLFX: Refresh Live Preview
Settings
lfx.path: path to thelfxexecutable. Default:"lfx".lfx.check.onSave: run checks when saving.lfxfiles. Default:true.lfx.check.onType: run checks while typing using a debounce. Default:false.lfx.check.debounceMs: debounce delay in milliseconds for on-type checks. Default:400.lfx.moduleRoots: additional module roots passed through as repeated--module-rootflags.lfx.trace.diagnostics: log CLI tracing and diagnostics flow to the output channel.lfx.preview.enableOnSave: refresh the live preview when saving the active.lfxfile. Default:true.lfx.preview.trackActiveEditor: retarget an open preview when switching active.lfxeditors. Default:true.lfx.preview.preferredLayout: default built-in layout used by the live preview panel.lfx.preview.trace: log preview protocol and runtime tracing to the output channel. Default:false.
Notes
- The extension uses regular VS Code extension APIs rather than an LSP.
- Semantic tokens, completion, hovers, formatting, rename, and go-to-definition are intentionally out of scope for v1.