
Thrift Weaver for VSCode
Thrift Weaver adds Thrift support to VS Code.
Why This Extension
- See errors while you type.
- Format whole files or a selected range.
- Use symbols, folds, and semantic tokens.
- Run with managed
thriftls or your own thriftls path.
Install
Option 1: Visual Studio Marketplace
- Open the Extensions view in VS Code.
- Search for
kpumuk.thrift-weaver-vscode.
- Click Install.
Marketplace page: Thrift Weaver
Option 2: Open VSX Registry
Install from Open VSX (useful for VS Code-compatible editors like VSCodium):
Thrift Weaver on Open VSX
Option 3: Install .vsix
code --install-extension thrift-weaver-vscode-<version>.vsix --force
Quick Start
- Open any
.thrift file.
- Run Format Document or Format Selection.
- If setup fails, set
thrift.server.path to your local thriftls binary.
[!IMPORTANT]
Managed install is on by default. The extension downloads a matching thriftls binary and checks its SHA-256 hash.
Features
- Syntax highlighting.
- Diagnostics.
- Document format and range format.
- Document symbols.
- Folding ranges.
- Selection ranges.
- Semantic tokens.
- Command:
Thrift: Restart Language Server.
Settings
All settings start with thrift..
Main settings:
- Server path: use your own
thriftls binary.
- Server args: pass extra args to
thriftls.
- Line width: set your preferred wrap width.
- Trace level: choose
off, messages, or verbose.
- Managed install: choose if auto install is on.
- Manifest URL: set where install info comes from.
- Insecure HTTP: allow only for local tests.
Example settings.json
{
// Path to local thriftls (empty = managed install path)
"thrift.server.path": "",
// Extra args for thriftls
"thrift.server.args": [],
// Preferred line width for formatting
"thrift.format.lineWidth": 100,
// LSP trace level
"thrift.trace.server": "off",
// Enable managed thriftls install
"thrift.managedInstall.enabled": true,
// Managed install manifest URL
"thrift.managedInstall.manifestUrl": "https://github.com/kpumuk/thrift-weaver/releases/latest/download/thriftls-manifest.json",
// Allow HTTP only for local testing
"thrift.managedInstall.allowInsecureHttp": false
}
Managed Install Notes
Managed install flow:
- Download manifest.
- Pick your platform artifact.
- Download and verify hash.
- Install with rollback.
[!WARNING]
Non-HTTPS URLs are blocked unless thrift.managedInstall.allowInsecureHttp is set to true.
Troubleshooting
- Open Output panel and check:
Thrift Weaver
Thrift Weaver LSP Trace
- Run Thrift: Restart Language Server.
- Confirm the mode is
Thrift.
- If needed, set
thrift.server.path.
Managed install fails
- Check
thrift.managedInstall.manifestUrl.
- Use HTTPS unless this is local testing.
- Check network access from VS Code.
- Set
thrift.server.path as fallback.
Server starts, then stops
- Set
thrift.trace.server to verbose.
- Restart the language server.
- Share logs in a GitHub issue.
Issues: github.com/kpumuk/thrift-weaver/issues