Fly Programming Language — Visual Studio Code Extension
Full language support for the Fly programming language in Visual Studio Code. FeaturesEditor
TestingFly's test system is intrinsic to the language — tests live inside production code with zero overhead in release builds.
Language intelligence (via
|
| Setting | Default | Description |
|---|---|---|
fly.compilerPath |
fly |
Path to the Fly compiler binary |
fly.lspPath |
(auto) | Path to fly-lsp; auto-discovered next to fly.compilerPath |
fly.enableLsp |
true |
Enable the language server (hover, go-to-definition, references, inlay hints, semantic tokens, workspace symbols, …) |
fly.enableDiagnostics |
true |
Run compiler on save and show inline diagnostics |
fly.enableWorkspaceDiagnostics |
true |
Scan all .fly files in the workspace at startup |
fly.buildArgs |
(empty) | Extra flags appended to fly when running Fly: Build File |
fly.debugBuildArgs |
--debug |
Compiler flags used by Fly: Debug File |
fly.flypPath |
(auto) | Path to flyp; auto-discovered next to fly.compilerPath |
fly.flypBuildArgs |
(empty) | Extra flags appended to flyp build |
Use Fly: Select Compiler from the Command Palette to pick the compiler interactively — the extension auto-discovers all Fly installations and updates fly.lspPath automatically.
The status bar shows two items when a .fly file is active: $(tools) fly X.Y.Z (compiler version, click to change) and $(check) LSP / $(error) LSP (language server connection state).
Commands
Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS) and type Fly or Flyp to filter.
Compiler commands — active on .fly files
| Command | Shortcut | Description |
|---|---|---|
| Fly: Select Compiler | — | Open a quick-pick to choose the active Fly installation. Auto-fills fly.lspPath from the same directory. |
| Fly: Build File | Ctrl+Shift+B |
Compile the current .fly file. Errors appear in the Problems panel via the $fly problem matcher. |
| Fly: Run File | Ctrl+F5 |
Compile and immediately run the current .fly file in the integrated terminal. Uses && — the program is not launched if compilation fails. |
| Fly: Debug File | F5 |
Compile with DWARF debug symbols and launch the program under LLDB. Requires codelldb. Breakpoints in .fly files are respected. |
The Debug $(debug-alt), Run $(run), and Build $(play) buttons appear in the editor title bar whenever a .fly file is active.
Package manager commands — active on fly.toml
| Command | Shortcut | Description |
|---|---|---|
| Flyp: Build | Ctrl+Shift+B |
Run flyp build in the project root. Errors appear in the Problems panel. |
| Flyp: Run | — | Run flyp run in the project root. |
| Flyp: Test | — | Run flyp test in the project root. |
| Flyp: Add Dependency | — | Interactive wizard: prompts for the package name, git URL, and ref type (tag / branch / rev), then runs flyp add. |
| Flyp: Lock (Update fly.lock) | — | Run flyp lock to re-resolve all dependencies and regenerate fly.lock. |
The Run $(run-above) and Build $(play) buttons appear in the editor title bar when fly.toml is open.
Keyboard Shortcuts
| Shortcut | Action | Context |
|---|---|---|
Ctrl+Shift+B / Cmd+Shift+B |
Fly: Build File | .fly file active |
Ctrl+F5 / Cmd+F5 |
Fly: Run File | .fly file active |
F5 |
Fly: Debug File | .fly file active, not already in debug |
Ctrl+Shift+B / Cmd+Shift+B |
Flyp: Build | fly.toml active |
F12 |
Go to Definition | .fly file |
Shift+F12 |
Find References | .fly file |
Alt+Shift+→ |
Expand Selection | .fly file |
Ctrl+T / Cmd+T |
Workspace Symbols | anywhere |
Troubleshooting
"fly-lsp not found" warning in the status bar
The extension cannot find the fly-lsp binary next to the Fly compiler. Options:
- Ensure
fly-lspis in the same directory asflyand both are on yourPATH. - Set
fly.lspPathexplicitly in VS Code settings to the full path of thefly-lspbinary. - Run Fly: Select Compiler — the extension will auto-fill
fly.lspPathiffly-lspis a sibling binary.
Compiler not found / status bar shows $(warning) fly (not found)
fly is not on PATH or the configured fly.compilerPath is wrong. Run Fly: Select Compiler to search installed Fly versions automatically.
Debug (F5) does nothing or shows "extension not found"
The codelldb extension is required for debugging. Install it from the VS Code Marketplace and reload VS Code.
Diagnostics appear only for open files
Enable fly.enableWorkspaceDiagnostics (default: true) to scan the entire workspace at startup.
The LSP status bar shows $(error) LSP or $(circle-slash) LSP
$(circle-slash): LSP is disabled — setfly.enableLsptotrue.$(error): the server crashed or stopped — check the Fly Language Server output channel (View → Output → Fly Language Server) for the error.
Contributing
Running the extension in development mode
git clone https://github.com/fly-lang/vscode-extension.git
cd vscode-extension
npm install
Open the folder in VS Code and press F5. This compiles the TypeScript and launches an Extension Development Host window with the extension loaded from source. Any change to the TypeScript source requires re-running npm run compile (or using npm run watch for incremental rebuilds).
Building the fly-lsp language server
The language server is part of the Fly compiler repository. To build it:
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --target fly-lsp
Then set fly.lspPath in your VS Code settings to <build-dir>/bin/fly-lsp.
Reporting issues
Please open an issue at github.com/fly-lang/vscode-extension/issues with:
- VS Code version
- Extension version (shown in the Extensions panel)
- Contents of the Fly Language Server output channel
- Steps to reproduce
Releasing
See RELEASING.md for the CI/CD workflow, how to publish a new version to the Marketplace, and the secrets that must be configured in the repository.