https://github.com/zed-extensions/tsgo
Extension for Zed to support TypeScript Native
https://github.com/zed-extensions/tsgo
Last synced: 5 months ago
JSON representation
Extension for Zed to support TypeScript Native
- Host: GitHub
- URL: https://github.com/zed-extensions/tsgo
- Owner: zed-extensions
- License: apache-2.0
- Created: 2025-05-22T16:20:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-29T17:29:33.000Z (6 months ago)
- Last Synced: 2026-01-01T22:37:48.357Z (6 months ago)
- Language: Rust
- Size: 37.1 KB
- Stars: 146
- Watchers: 6
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zed-extensions - tsgo
README
# tsgo: Native TypeScript Compiler Integration for Zed
This extension integrates `tsgo`, Microsoft's native Go-based TypeScript compiler, into the Zed editor, delivering enhanced performance and efficiency for TypeScript development.
## ๐ Why `tsgo`?
Microsoft is transitioning the TypeScript compiler from its JavaScript implementation to a native version written in Go, aiming for significant performance improvements:
- **Faster Compilation**: Achieves up to 10x speed improvements in large projects.
- **Reduced Memory Usage**: Optimized memory handling in native execution.
- **Improved Editor Performance**: Faster IntelliSense and language services.
- **Scalability**: Better handling of large codebases.
> _Example Benchmarks_:
>
> - **VS Code**: 77.8s โ 7.5s (10.4x speedup)
> - **Playwright**: 11.1s โ 1.1s (10.1x speedup)
> - **TypeORM**: 17.5s โ 1.3s (13.5x speedup)
>
> _Source: [Microsoft Developer Blog](https://devblogs.microsoft.com/typescript/typescript-native-port/)_
## ๐ Installation
1. Open Zed's Extensions page.
2. Search for `tsgo` and install the extension.
## โ๏ธ Configuration
_Note_: `tsgo` is currently in preview and may not support all features of the standard `tsc` compiler.
### Basic Setup
Enable `tsgo` in your Zed settings:
```json
{
"languages": {
"TypeScript": {
"language_servers": ["tsgo"]
}
}
}
```
You can also use `tsgo` in tandem with other language servers (e.g. `typescript-language-server` or `vtsls`). Zed will use `tsgo` for features it supports and fallback to the next language server in the list for unsupported features.
To do that with `vtsls`, use:
```json
{
"languages": {
"TypeScript": {
"language_servers": ["tsgo", "vtsls"]
}
}
}
```
### Advanced Configuration
#### Specifying a Package Version
By default, the extension installs and uses the latest version of the `@typescript/native-preview` [npm package](https://www.npmjs.com/package/@typescript/native-preview?activeTab=versions). To pin a specific version:
```json
{
"lsp": {
"tsgo": {
"settings": {
"package_version": "7.0.0-dev.20251029.1"
}
}
}
}
```
This is useful for:
- Ensuring consistent behavior across the project
- Testing specific versions
- Avoiding automatic updates that might introduce issues
## ๐งช Status
This extension is in early development stages. While it offers significant performance benefits, some features may be incomplete or unstable. Contributions and feedback are welcome to improve its functionality.