@ttsc/vscode 0.14.0-dev.20260528.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,94 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
MIT
|
|
5
|
+
[](https://github.com/samchon/ttsc/blob/master/LICENSE) [](https://www.npmjs.com/package/@ttsc/vscode) [](https://www.npmjs.com/package/@ttsc/vscode) [](https://github.com/samchon/ttsc/actions?query=workflow%3Atest) [](https://ttsc.dev/docs) [](https://discord.gg/E94XhzrUCZ)
|
|
6
6
|
|
|
7
|
-
VS Code extension for [`ttsc`](https://ttsc.dev) projects.
|
|
7
|
+
VS Code extension for [`ttsc`](https://ttsc.dev) projects. It shows TypeScript-Go diagnostics and `@ttsc/lint` lint and format inside your editor.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
`ttsc` dependency, so VS Code uses the same TypeScript-Go version your project
|
|
11
|
-
pins.
|
|
9
|
+
## Setup
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
### Requirements
|
|
14
12
|
|
|
15
13
|
- **VS Code** 1.94 or later
|
|
16
14
|
- **Node.js** 18 or later
|
|
17
|
-
- **`ttsc`
|
|
18
|
-
that ships with your project's `ttsc` package
|
|
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.
|
|
19
16
|
|
|
20
17
|
```bash
|
|
21
|
-
npm install -D ttsc @typescript/native-preview
|
|
18
|
+
npm install -D ttsc @ttsc/lint @typescript/native-preview
|
|
22
19
|
```
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
### Install
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
Not on the VS Code Marketplace yet. Install from npm:
|
|
27
24
|
|
|
28
25
|
```bash
|
|
29
26
|
npm install -D @ttsc/vscode
|
|
30
|
-
npx ttsc
|
|
27
|
+
npx @ttsc/vscode
|
|
31
28
|
```
|
|
32
29
|
|
|
33
|
-
|
|
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`.
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
### Format on save
|
|
36
33
|
|
|
37
|
-
|
|
34
|
+
Set `samchon.ttsc` as the default formatter and turn on `editor.formatOnSave` in `.vscode/settings.json`:
|
|
38
35
|
|
|
39
|
-
```
|
|
40
|
-
|
|
36
|
+
```jsonc
|
|
37
|
+
"[typescript][typescriptreact]": {
|
|
38
|
+
"editor.defaultFormatter": "samchon.ttsc",
|
|
39
|
+
"editor.formatOnSave": true
|
|
40
|
+
}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
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.
|
|
44
46
|
|
|
45
47
|
## What it adds
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
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.
|
|
73
|
-
|
|
74
|
-
The extension's identifier inside VS Code is `samchon.ttsc`.
|
|
75
|
-
|
|
76
|
-
## Settings
|
|
77
|
-
|
|
78
|
-
Open VS Code's settings (`Ctrl+,` / `Cmd+,`) and search for `ttsc`, or edit `settings.json` directly:
|
|
79
|
-
|
|
80
|
-
| Setting | Default | Effect |
|
|
81
|
-
| ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
|
-
| `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. |
|
|
83
|
-
| `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. |
|
|
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`.
|
|
84
53
|
|
|
85
54
|
## Troubleshooting
|
|
86
55
|
|
|
87
|
-
|
|
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"`.
|
|
57
|
+
|
|
58
|
+
## Sponsors
|
|
59
|
+
|
|
60
|
+
[](https://github.com/sponsors/samchon)
|
|
88
61
|
|
|
89
|
-
|
|
90
|
-
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.
|
|
91
|
-
3. **Read the server log:** open **View → Output**, pick **ttsc** from the dropdown.
|
|
92
|
-
4. **Restart the server:** command palette → `ttsc: Restart language server`.
|
|
93
|
-
5. **Verbose tracing:** set `ttsc.trace.server` to `"verbose"`, then read **View → Output → ttsc (trace)**.
|
|
62
|
+
Thanks for your support.
|
|
94
63
|
|
|
95
|
-
|
|
64
|
+
Your [donation](https://github.com/sponsors/samchon) encourages `ttsc` development.
|
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.1.vsix → ttsc-vscode-0.14.0-dev.20260529.2.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.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.
|
|
89
|
+
"ttsc": "0.14.0-dev.20260529.2"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "rimraf lib dist && node build/build.cjs"
|