Skip to Content

VS Code

The extension brings TypeScript-Go and supported ttsc plugin features into one editor session. It reads the project’s own ttsc, typescript, and plugin config, so the lint diagnostics you see in VS Code match what npx ttsc reports in CI.

It needs VS Code 1.94 or later and a workspace with a tsconfig.json (or jsconfig.json).

Install

Search ttsc in the Marketplace and pick the extension by samchon, or install from a shell:

npx @ttsc/vscode

That wraps the code CLI; the direct form is code --install-extension samchon.ttsc. If code is not on your PATH, run Shell Command: Install β€˜code’ command in PATH from the command palette first.

What it adds

  • TypeScript-Go hover, navigation, completions, and diagnostics.
  • @ttsc/lint diagnostics, suggestions, fix-all actions, and format.
  • JSDoc completion from a built-in lint rule and project-indexed completion from contributor rules that publish it.
  • Command palette entries: ttsc: Fix all lint issues, ttsc: Format document, ttsc: Restart language server.
  • Multi-root workspaces, each folder keeping its own ttsc, typescript, and plugin config.

The Lint in VS Code guide walks through the single-server workflow with a runnable JSDoc completion example.

Format on save

Point the default formatter at the extension in .vscode/settings.json:

{ "[typescript][typescriptreact]": { "editor.defaultFormatter": "samchon.ttsc", "editor.formatOnSave": true } }

It formats the live buffer on save using the format block from lint.config.ts. To also apply lint fixes on save, enable:

{ "editor.codeActionsOnSave": { "source.fixAll.ttsc": "explicit" } }

When nothing shows up

Work through these in order:

  1. Confirm the workspace has a tsconfig.json or jsconfig.json.
  2. Confirm ttsc resolves in the project: npx ttsc --version.
  3. Confirm the project itself checks: npx ttsc --noEmit.
  4. Open View β†’ Output, pick ttsc from the dropdown, and read the server log.
  5. For full LSP tracing, set ttsc.trace.server to "verbose", then run Developer: Set Log Level…, select ttsc (trace), and choose Trace. Tracing starts immediately; do not reload the window.

The full extension reference, including the uninstall command, is in the @ttsc/vscode README. See Lint in VS Code for completion, diagnostics, suggestions, fixes, and formatting in one workflow.

For editors that start ttscserver themselves, the native host interprets arguments before the launcher prepares project plugins. Both --cwd <dir> and -cwd=<dir> work; the last assignment selects the project, config or TypeScript-Go binary. Parsing stops at -- or the first positional argument. Use a matching native ttscserver with the JavaScript launcher when overriding TTSCSERVER_BINARY.

Omitting --tsconfig keeps nearest-ancestor tsconfig.json or jsconfig.json discovery for plugins. An empty project without either config can still start the language server.

Last updated on