@ttsc/vscode 0.14.0-dev.20260528 → 0.14.0-dev.20260529.1
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
|
@@ -6,81 +6,74 @@ MIT licensed · [npm](https://www.npmjs.com/package/@ttsc/vscode) · [docs](http
|
|
|
6
6
|
|
|
7
7
|
VS Code extension for [`ttsc`](https://ttsc.dev) projects.
|
|
8
8
|
|
|
9
|
-
It starts the `ttscserver` language-server launcher from your project's own
|
|
10
|
-
`ttsc` dependency, so VS Code uses the same TypeScript-Go version your project
|
|
11
|
-
pins.
|
|
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.
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
### Requirements
|
|
14
14
|
|
|
15
15
|
- **VS Code** 1.94 or later
|
|
16
16
|
- **Node.js** 18 or later
|
|
17
|
-
- **`ttsc` installed in your project** — the extension uses the language server
|
|
18
|
-
that ships with your project's `ttsc` package
|
|
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.
|
|
19
18
|
|
|
20
19
|
```bash
|
|
21
|
-
npm install -D ttsc @typescript/native-preview
|
|
20
|
+
npm install -D ttsc @ttsc/lint @typescript/native-preview
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
### Install
|
|
25
24
|
|
|
26
25
|
The extension is not on the VS Code Marketplace yet. For now it ships as an npm package with a one-shot installer:
|
|
27
26
|
|
|
28
27
|
```bash
|
|
29
28
|
npm install -D @ttsc/vscode
|
|
30
|
-
npx ttsc
|
|
29
|
+
npx @ttsc/vscode
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
`npx ttsc
|
|
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.
|
|
34
33
|
|
|
35
|
-
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
|
|
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/`.)
|
|
36
35
|
|
|
37
36
|
To uninstall:
|
|
38
37
|
|
|
39
38
|
```bash
|
|
40
|
-
npx ttsc
|
|
39
|
+
npx @ttsc/vscode uninstall
|
|
40
|
+
npm uninstall @ttsc/vscode
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Marketplace release is tracked for v1; once it lands, the `npx` step goes away.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
### Settings
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
starts a server only when it can resolve a project-local `ttscserver`.
|
|
49
|
-
|
|
50
|
-
- **Project-local language server.** The extension resolves `ttscserver` from
|
|
51
|
-
the active file's package/workspace, then starts the project-selected
|
|
52
|
-
`tsgo --lsp --stdio` process behind it.
|
|
53
|
-
- **TypeScript-Go diagnostics and editor features.** Hover, navigation,
|
|
54
|
-
completions, and TypeScript-Go diagnostics come from the upstream `tsgo` LSP
|
|
55
|
-
process.
|
|
56
|
-
- **ttsc plugin diagnostics and actions.** LSP-capable plugins are discovered
|
|
57
|
-
from the same project config and merged into the editor stream. `@ttsc/lint`
|
|
58
|
-
currently contributes lint diagnostics, fix-all actions, and document format
|
|
59
|
-
edits. Plugin diagnostics, code actions, and command computation use the
|
|
60
|
-
saved project state today; commands return VS Code `WorkspaceEdit`s and the
|
|
61
|
-
editor applies them only while the touched documents are still clean.
|
|
62
|
-
- **Monorepo-aware server roots.** Multi-root workspaces start server contexts
|
|
63
|
-
from the active file and workspace folders, resolved from the nearest
|
|
64
|
-
`tsconfig*.json` / `jsconfig*.json`. Add packages as VS Code workspace
|
|
65
|
-
folders when you want each package to keep its own active server context.
|
|
66
|
-
- **Command palette entries:** `ttsc: Restart language server`,
|
|
67
|
-
`ttsc: Fix all lint issues`, and `ttsc: Format document`. The lint and
|
|
68
|
-
format commands require an LSP-capable plugin that owns those command ids,
|
|
69
|
-
such as `@ttsc/lint`. The VS Code extension registers wrapper commands for
|
|
70
|
-
those built-in lint/format flows; other plugin command ids are advertised
|
|
71
|
-
through the language client and their returned `changes`-map `WorkspaceEdit`s
|
|
72
|
-
are applied with the same clean-document guard.
|
|
47
|
+
Open VS Code's settings (`Ctrl+,` / `Cmd+,`) and search for `ttsc`, or edit `settings.json` directly:
|
|
73
48
|
|
|
74
|
-
|
|
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. |
|
|
75
53
|
|
|
76
|
-
|
|
54
|
+
To format on save, make `samchon.ttsc` the default formatter for the languages you want and enable `editor.formatOnSave`:
|
|
77
55
|
|
|
78
|
-
|
|
56
|
+
```jsonc
|
|
57
|
+
"[typescript][typescriptreact]": {
|
|
58
|
+
"editor.defaultFormatter": "samchon.ttsc",
|
|
59
|
+
"editor.formatOnSave": true
|
|
60
|
+
}
|
|
61
|
+
```
|
|
79
62
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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" }`.
|
|
64
|
+
|
|
65
|
+
## What it adds
|
|
66
|
+
|
|
67
|
+
The extension activates on TypeScript, JavaScript, TSX, and JSX files, then starts a server only when it can resolve a project-local `ttscserver`.
|
|
68
|
+
|
|
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`.
|
|
75
|
+
|
|
76
|
+
The extension's identifier inside VS Code is `samchon.ttsc`.
|
|
84
77
|
|
|
85
78
|
## Troubleshooting
|
|
86
79
|
|
|
@@ -92,4 +85,4 @@ If TypeScript-Go or ttsc plugin diagnostics don't appear after install:
|
|
|
92
85
|
4. **Restart the server:** command palette → `ttsc: Restart language server`.
|
|
93
86
|
5. **Verbose tracing:** set `ttsc.trace.server` to `"verbose"`, then read **View → Output → ttsc (trace)**.
|
|
94
87
|
|
|
95
|
-
If `npx ttsc
|
|
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.
|
package/bin/install.js
CHANGED
|
@@ -85,7 +85,7 @@ function main(argv = process.argv.slice(2)) {
|
|
|
85
85
|
} else if (sub === "uninstall") {
|
|
86
86
|
runCode(["--uninstall-extension", extensionId]);
|
|
87
87
|
} else {
|
|
88
|
-
console.error(`Usage: ttsc
|
|
88
|
+
console.error(`Usage: npx @ttsc/vscode <install|uninstall>`);
|
|
89
89
|
process.exit(1);
|
|
90
90
|
}
|
|
91
91
|
}
|
package/dist/{ttsc-vscode-0.14.0-dev.20260528.vsix → ttsc-vscode-0.14.0-dev.20260529.1.vsix}
RENAMED
|
Binary file
|
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.
|
|
5
|
+
"version": "0.14.0-dev.20260529.1",
|
|
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.
|
|
89
|
+
"ttsc": "0.14.0-dev.20260529.1"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "rimraf lib dist && node build/build.cjs"
|