Skip to Content

Language Server

ttscserver is the LSP host. Install it through the VSCode extension (not yet on Marketplace — build packages/vscode-ttsc and code --install-extension the .vsix; Marketplace tracked for v1) and your editor sees lint diagnostics, plugin code actions, and plugin-defined commands as you type — same things ttsc would surface at build time, but live.

npx ttscserver --stdio # plain LSP server over stdio

What you actually do

Almost always: nothing. You install the VSCode extension; it starts ttscserver from your project’s local node_modules. Diagnostics appear, code actions appear, commands appear.

If something doesn’t work, the recovery is in Troubleshooting.

What it adds beyond tsgo’s LSP

TypeScript-Go ships its own Language Server — type errors, hovers, completions, the usual. ttscserver wraps that server and splices in three things your ttsc plugins produce:

EventWhat ttscserver adds
textDocument/publishDiagnosticsLint findings for the same file are appended to the diagnostics array, so they show in the same gutter / underline UI.
textDocument/codeActionPlugin-owned quick-fixes (e.g. @ttsc/lint autofixes) appear in the lightbulb menu alongside built-in TS code actions.
workspace/executeCommandPlugin-defined commands (anything a plugin registers) are routed back to the plugin for the actual workspace edit.

All other traffic flows through to tsgo’s LSP unmodified.

CLI flags

ttscserver [--stdio] [--cwd <dir>] [--progress-delay <duration>]
FlagEffect
--stdioUse stdin/stdout for JSON-RPC. Required — ttscserver does not support other transports yet.
--cwd <dir>Project root. Default: process working directory.
--progress-delay <duration>How long to wait before emitting $/progress notifications for long compiles. Default 250ms.

Talking to it from other editors

The wire protocol is plain LSP. Neovim, JetBrains’ LSP4IJ, Emacs lsp-mode, Helix, and any other LSP client can spawn ttscserver --stdio and get the same behavior the VSCode extension does.

Editor-specific niceties — output channel wiring, command-palette entries — need per-editor work. The VSCode extension is the only first-party client today. Contributions for other editors are welcome.

Trace the server

If diagnostics aren’t appearing or you want to see the raw JSON-RPC, add to .vscode/settings.json:

{ "ttsc.trace.server": "verbose" }

Then open View → Output and select ttsc from the dropdown.

See also

Last updated on