Sailfin Language Support for VS Code
This extension brings first-class Sailfin language tooling to Visual Studio Code with updated grammar coverage, keyword intelligence, and authoring helpers that track the latest Stage 1 compiler.
Features
- Modern TextMate grammar covering Sailfin declarations, pipelines, prompts, effects, decorators, and interpolation.
- Contextual completions for keywords, effects (
![io, net, ...]
), prompt channels, and in-scope bindings.
- Inline documentation for language keywords, effects, and prompt channels via hover.
- Quick fixes to insert missing bindings or remove unused ones flagged by lightweight diagnostics.
- Updated snippets for functions, models, pipelines, prompts, tests, structs, and more.
- Basic formatting helper that normalises leading indentation to two spaces.
Requirements
This extension requires Visual Studio Code 1.96.0 or later.
Installation
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the square icon in the sidebar or pressing
Ctrl+Shift+X
.
- Search for "Sailfin" in the Extensions view search box.
- Click the Install button for the "Sailfin Language Support" extension.
Usage
Open a .sfn
file to activate the language features. Snippets surface automatically; trigger completions with Ctrl+Space
when editing effect lists or prompt blocks to see the contextual helpers.
Local validation
To verify the grammar stays aligned with the Sailfin language sources, point the optional validator at a checkout of the language repository:
npm run validate:sailfin -- ../sailfin
You can also set SAILFIN_REPO=/path/to/sailfin
and omit the argument. The script tokenises every .sfn
file it finds and reports any tokenisation failures.
Contributing
If you encounter any issues or have suggestions for improving the Sailfin extension, please report them on the GitHub repository
License
This extension is licensed under the MIT License.