@ttsc/vscode 0.14.0-dev.20260529.1 → 0.14.0-dev.20260529.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,11 +2,9 @@
2
2
 
3
3
  ![banner of @ttsc/vscode](https://ttsc.dev/og.jpg)
4
4
 
5
- MIT licensed · [npm](https://www.npmjs.com/package/@ttsc/vscode) · [docs](https://ttsc.dev/docs) · [Discord](https://discord.gg/E94XhzrUCZ)
5
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/ttsc/blob/master/LICENSE) [![NPM Version](https://img.shields.io/npm/v/@ttsc/vscode.svg)](https://www.npmjs.com/package/@ttsc/vscode) [![NPM Downloads](https://img.shields.io/npm/dm/@ttsc/vscode.svg)](https://www.npmjs.com/package/@ttsc/vscode) [![Build Status](https://github.com/samchon/ttsc/workflows/test/badge.svg)](https://github.com/samchon/ttsc/actions?query=workflow%3Atest) [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://ttsc.dev/docs) [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
6
6
 
7
- VS Code extension for [`ttsc`](https://ttsc.dev) projects.
8
-
9
- It starts the `ttscserver` language-server launcher from your project's own `ttsc` dependency, so VS Code uses the same TypeScript-Go version your project pins.
7
+ VS Code extension for [`ttsc`](https://ttsc.dev) projects. It shows TypeScript-Go diagnostics and `@ttsc/lint` lint and format inside your editor.
10
8
 
11
9
  ## Setup
12
10
 
@@ -14,7 +12,7 @@ It starts the `ttscserver` language-server launcher from your project's own `tts
14
12
 
15
13
  - **VS Code** 1.94 or later
16
14
  - **Node.js** 18 or later
17
- - **`ttsc` and `@ttsc/lint` installed in your project** the extension uses the language server that ships with your project's `ttsc` package, and `@ttsc/lint` provides the lint diagnostics and format rules it surfaces.
15
+ - **`ttsc`, `@ttsc/lint`, and `@typescript/native-preview` in your project.** `@typescript/native-preview` is the TypeScript-Go engine `ttsc` runs on; it is a separate package that `ttsc` does not bundle.
18
16
 
19
17
  ```bash
20
18
  npm install -D ttsc @ttsc/lint @typescript/native-preview
@@ -22,36 +20,18 @@ npm install -D ttsc @ttsc/lint @typescript/native-preview
22
20
 
23
21
  ### Install
24
22
 
25
- The extension is not on the VS Code Marketplace yet. For now it ships as an npm package with a one-shot installer:
23
+ Not on the VS Code Marketplace yet. Install from npm:
26
24
 
27
25
  ```bash
28
26
  npm install -D @ttsc/vscode
29
27
  npx @ttsc/vscode
30
28
  ```
31
29
 
32
- `npx @ttsc/vscode` calls `code --install-extension` with the `.vsix` bundled in the npm tarball VS Code picks it up immediately, no restart needed.
33
-
34
- If the `code` CLI isn't on your `PATH`, open VS Code first, run **Shell Command: Install 'code' command in PATH** from the command palette, then re-run `npx @ttsc/vscode`. (As a manual fallback, VS Code → Extensions → "…" menu → **Install from VSIX** also works on the file `npx @ttsc/vscode` would have used — it lives under `node_modules/@ttsc/vscode/dist/`.)
35
-
36
- To uninstall:
37
-
38
- ```bash
39
- npx @ttsc/vscode uninstall
40
- npm uninstall @ttsc/vscode
41
- ```
42
-
43
- Marketplace release is tracked for v1; once it lands, the `npx` step goes away.
44
-
45
- ### Settings
46
-
47
- Open VS Code's settings (`Ctrl+,` / `Cmd+,`) and search for `ttsc`, or edit `settings.json` directly:
30
+ If the `code` CLI isn't on your `PATH`, run **Shell Command: Install 'code' command in PATH** from VS Code's command palette, then re-run `npx @ttsc/vscode`.
48
31
 
49
- | Setting | Default | Effect |
50
- | --- | --- | --- |
51
- | `ttsc.serverPath` | `""` | Absolute path to a `ttscserver` launcher or native binary. Empty uses the project's `ttsc` launcher, which builds `TTSC_LSP_PLUGINS_JSON` for plugin diagnostics/actions. Direct native paths need that manifest supplied out of band. |
52
- | `ttsc.trace.server` | `"off"` | Set to `"messages"` or `"verbose"` to log LSP traffic. The trace goes to **View → Output → ttsc (trace)**; server logs stay under **ttsc**. Useful when diagnostics don't show up. |
32
+ ### Format on save
53
33
 
54
- To format on save, make `samchon.ttsc` the default formatter for the languages you want and enable `editor.formatOnSave`:
34
+ Set `samchon.ttsc` as the default formatter and turn on `editor.formatOnSave` in `.vscode/settings.json`:
55
35
 
56
36
  ```jsonc
57
37
  "[typescript][typescriptreact]": {
@@ -60,29 +40,25 @@ To format on save, make `samchon.ttsc` the default formatter for the languages y
60
40
  }
61
41
  ```
62
42
 
63
- ttsc formats the in-memory buffer, so it works on unsaved edits. Lint **fixes** are not applied on save by default they can change code meaning so run `ttsc: Fix all lint issues` manually, or opt in with `"editor.codeActionsOnSave": { "source.fixAll.ttsc": "explicit" }`.
43
+ Lint **fixes** stay off-save by default because they can change code meaning. Run `ttsc: Fix all lint issues` from the command palette, or opt in with `"editor.codeActionsOnSave": { "source.fixAll.ttsc": "explicit" }`.
44
+
45
+ The format rules come from your project's `lint.config`, so format-on-save does nothing until that config has a `format` block.
64
46
 
65
47
  ## What it adds
66
48
 
67
- The extension activates on TypeScript, JavaScript, TSX, and JSX files, then starts a server only when it can resolve a project-local `ttscserver`.
49
+ - TypeScript-Go diagnostics, hover, navigation, and completions.
50
+ - `@ttsc/lint` lint diagnostics, plus `ttsc: Fix all lint issues` and `ttsc: Format document` in the command palette.
51
+ - Format on save with `@ttsc/lint`'s rules, shown above.
52
+ - Monorepo-aware: each package uses its own `tsconfig` and `lint.config`.
68
53
 
69
- - **Project-local language server.** The extension resolves `ttscserver` from the active file's package/workspace, then starts the project-selected `tsgo --lsp --stdio` process behind it.
70
- - **TypeScript-Go diagnostics and editor features.** Hover, navigation, completions, and TypeScript-Go diagnostics come from the upstream `tsgo` LSP process.
71
- - **ttsc plugin diagnostics and actions.** Project plugins are merged into the editor stream; `@ttsc/lint` contributes lint diagnostics plus fix-all and format actions. These read your **saved** file — so save before relying on a lint fix — except format-on-save, which works on the live buffer (see [Settings](#settings)).
72
- - **Format on save.** With `editor.formatOnSave` and `samchon.ttsc` as the default formatter, the extension formats your unsaved buffer using `@ttsc/lint`'s format rules — no need to save first. Lint fixes stay off-save by default (they can change code meaning). See [Settings](#settings) to enable it.
73
- - **Monorepo-aware server roots.** Multi-root workspaces start server contexts from the active file and workspace folders, resolved from the nearest `tsconfig*.json` / `jsconfig*.json`. Add packages as VS Code workspace folders when you want each package to keep its own active server context.
74
- - **Command palette:** `ttsc: Restart language server`, `ttsc: Fix all lint issues`, and `ttsc: Format document`. The lint and format commands need a plugin that provides them, such as `@ttsc/lint`.
54
+ ## Troubleshooting
75
55
 
76
- The extension's identifier inside VS Code is `samchon.ttsc`.
56
+ No diagnostics? Confirm `ttsc` runs in the project (`npx ttsc --version`), then check **View → Output → ttsc** for the server log. For LSP tracing, set `ttsc.trace.server` to `"verbose"`.
77
57
 
78
- ## Troubleshooting
58
+ ## Sponsors
79
59
 
80
- If TypeScript-Go or ttsc plugin diagnostics don't appear after install:
60
+ [![Sponsors](https://raw.githubusercontent.com/samchon/sponsor-images/refs/heads/master/public/circle.png)](https://github.com/sponsors/samchon)
81
61
 
82
- 1. **Check the project has `ttsc`:** `npx ttsc --version`. If this errors, install `ttsc @typescript/native-preview` in the project first.
83
- 2. **Check the same config in the CLI:** run `npx ttsc --noEmit -p <selected tsconfig>` from the project root and confirm the plugin diagnostics appear there.
84
- 3. **Read the server log:** open **View → Output**, pick **ttsc** from the dropdown.
85
- 4. **Restart the server:** command palette → `ttsc: Restart language server`.
86
- 5. **Verbose tracing:** set `ttsc.trace.server` to `"verbose"`, then read **View → Output → ttsc (trace)**.
62
+ Thanks for your support.
87
63
 
88
- If `npx @ttsc/vscode` errors with `\`code\` CLI not found on PATH`: open VS Code → command palette → **Shell Command: Install 'code' command in PATH**, then retry the install.
64
+ Your [donation](https://github.com/sponsors/samchon) encourages `ttsc` development.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ttsc/vscode",
3
3
  "displayName": "ttsc",
4
4
  "description": "Run the project-selected ttscserver in VS Code with TypeScript-Go and ttsc plugin LSP features.",
5
- "version": "0.14.0-dev.20260529.1",
5
+ "version": "0.14.0-dev.20260529.2",
6
6
  "publisher": "samchon",
7
7
  "license": "MIT",
8
8
  "author": "Jeongho Nam",
@@ -86,7 +86,7 @@
86
86
  "esbuild": "^0.25.12",
87
87
  "rimraf": "^6.1.2",
88
88
  "vscode-languageclient": "^9.0.1",
89
- "ttsc": "0.14.0-dev.20260529.1"
89
+ "ttsc": "0.14.0-dev.20260529.2"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "rimraf lib dist && node build/build.cjs"