How do I use TypeScript 7's native LSP (tsgo) as Serena's TypeScript backend?
I'm on Serena 0.1.4, Ubuntu 22.04, and want to use TypeScript 7's Go-based language server (
tsgo --lsp, latertsc --lsp --stdio) instead of the Node.jstypescript-language-serverwrapper. TheTypeScriptLanguageServerclass doesn't support thels_pathconfig option, and its startup capability checks reject tsgo's LSP responses (textDocumentSync can be an object, triggerCharacters can be a superset). Is there a supported config option or a working workaround?Originally asked on GitHub: https://github.com/oraios/serena/issues/1402
5 answers
Status: the tracker marks this issue closed (COMPLETED), but the feature was never merged into Serena. The original PR adding
typescript_tsgowas closed without comment by a maintainer, and as of October 2026 a new PR (#2178) is open, addingtypescript_tsgovia the released TypeScript 7 commandtsc --lsp --stdio.Until that lands, the only approach shown working in the thread is a wrapper-plus-patch hack for the existing
typescriptbackend. Inproject.yml:yamlls_specific_settings: typescript: ls_path: .serena/tsgo-lsp.shwith
.serena/tsgo-lsp.sh:sh#!/bin/sh SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" exec "$SCRIPT_DIR/../node_modules/.bin/tsgo" --lsp "$@"Then patch
solidlsp/language_servers/typescript_language_server.pyin the uv install to accept tsgo's initialize response:textDocumentSyncmay be an object withchange == 2instead of the integer 2, andcompletionProvider.triggerCharactersmay be a superset of[".", '"', "'", "/", "@", "<"]. The author had been using this for weeks; the annoyance is remembering to apply the patch daily since updates overwrite the uv cache.For released TypeScript 7, one commenter notes
@typescript/native-previewis no longer needed — the native LSP runs astsc --lsp --stdio. PR #2178 follows that approach: Serena installs the package automatically and runs the existing TypeScript tests against both servers. General advice: the wrapper and patch target the dev-previewtsgo --lsp; check which command your TypeScript install provides before wiring this up.Did this work for you?What @selbyk tried on GitHub (Worked)
Set
ls_specific_settings.typescript.ls_pathto a wrapper script in project.yml that execstsgo --lsp "$@", and patchedsolidlsp/language_servers/typescript_language_server.pyto accept tsgo's object-form textDocumentSync and superset trigger characters. The author used it for weeks, with the annoyance being remembering to re-apply the patch daily.Source: https://github.com/oraios/serena/issues/1402#issuecomment-4344683249 (opens external site)
Did this work for you?What @MischaPanch tried on GitHub (Didn't work)
The original PR by @8SFXIM5 adding
typescript_tsgogot an initial review but had failing tests and was later closed without comment by a maintainer.Source: https://github.com/oraios/serena/issues/1402#issuecomment-4344704738 (opens external site)
Did this work for you?What @Kiborgik tried on GitHub (Outcome unclear)
A contributor opened PR #2178 adding
typescript_tsgousing released TypeScript 7 (tsc --lsp --stdio), with Serena installing the package automatically and running existing tests against both servers. Not merged as of the thread.Source: https://github.com/oraios/serena/issues/1402#issuecomment-6262721529 (opens external site)
Did this work for you?What @Flimm tried on GitHub (Outcome unclear)
A commenter noted that with TypeScript 7.0 released,
@typescript/native-previewis no longer needed; you runtsc --lsp --stdioand stream input into it. Direction only, not tested in the thread.Source: https://github.com/oraios/serena/issues/1402#issuecomment-4922110732 (opens external site)
Did this work for you?
Related questions
- Serena MCP server SSE mode: dynamic client registration fails with HTTP 404
- Serena C# language server download fails: missing BuildHost.runtimeconfig.json on Windows
- Serena MCP server hangs at "Parsing all gitignore files" when project contains a large venv
- Serena MCP server fails to connect in Claude Code after installing with uvx
- Serena replace_symbol_body duplicates code in Claude Code — how to disable it?