Summary
TypeScript 7.0 introduces a native Go-based compiler and language server called tsgo (@typescript/native-preview). It implements the standard LSP protocol directly via tsgo --lsp, without requiring Node.js or the traditional typescript-language-server wrapper.
I'd like to request support for tsgo as an alternative TypeScript language backend in Serena (e.g., as a new language option like typescript_native or typescript_tsgo).
Motivation
- Performance: tsgo is written in Go and starts significantly faster than the Node.js-based tsserver. Memory usage is also much lower.
- Headless/agent use case: Serena runs as a background MCP service. The faster startup and lower resource footprint of tsgo makes it ideal for this scenario.
- Standard LSP: Unlike tsserver (which uses its own protocol and requires a wrapper like
typescript-language-server or vtsls), tsgo implements the LSP protocol natively. This should simplify integration.
- Future-proof: TypeScript 7.0 is the direction the TypeScript team is heading. Early support would benefit users who adopt it.
Current State
- Serena currently supports two TypeScript backends:
typescript (via typescript-language-server + tsserver.js) and typescript_vts (via vtsls). Both depend on Node.js.
- The
TypeScriptLanguageServer class does not support the ls_path configuration option, so there's no way to point it at tsgo.
- tsgo's LSP mode is invoked simply as
tsgo --lsp (stdio transport), which is similar to how many other language servers in solidlsp are started.
Proposed Approach
Add a new language option (e.g., typescript_native) that:
- Launches
tsgo --lsp via stdio
- Uses standard LSP initialization (no custom wrapper needed)
- Optionally allows configuring the tsgo binary path via
ls_specific_settings
Environment
- tsgo version:
7.0.0-dev.20260421.2 (installed via @typescript/native-preview)
- Serena version:
0.1.4
- OS: Ubuntu 22.04
References
Summary
TypeScript 7.0 introduces a native Go-based compiler and language server called tsgo (
@typescript/native-preview). It implements the standard LSP protocol directly viatsgo --lsp, without requiring Node.js or the traditionaltypescript-language-serverwrapper.I'd like to request support for tsgo as an alternative TypeScript language backend in Serena (e.g., as a new language option like
typescript_nativeortypescript_tsgo).Motivation
typescript-language-serverorvtsls), tsgo implements the LSP protocol natively. This should simplify integration.Current State
typescript(viatypescript-language-server+tsserver.js) andtypescript_vts(viavtsls). Both depend on Node.js.TypeScriptLanguageServerclass does not support thels_pathconfiguration option, so there's no way to point it at tsgo.tsgo --lsp(stdio transport), which is similar to how many other language servers in solidlsp are started.Proposed Approach
Add a new language option (e.g.,
typescript_native) that:tsgo --lspvia stdiols_specific_settingsEnvironment
7.0.0-dev.20260421.2(installed via@typescript/native-preview)0.1.4References