You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repo uses [Go 1.25 or higher](https://go.dev/dl/), [Rust 1.85 or higher](https://www.rust-lang.org/tools/install), [Node.js with npm](https://nodejs.org/), and [`hereby`](https://www.npmjs.com/package/hereby).
6
+
7
+
For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported.
8
+
When cloning, you'll want to clone with submodules:
If you have already cloned the repo, you can initialize the submodule with:
15
+
16
+
```sh
17
+
git submodule update --init --recursive
18
+
```
19
+
20
+
With the submodule in place and `npm ci`, you can run tasks via `hereby`, similar to the TypeScript repo:
21
+
22
+
```sh
23
+
hereby build # Build the tsgo binary (not required for tests)
24
+
hereby test# Run tests
25
+
hereby format # Format the code
26
+
hereby lint # Run linters
27
+
hereby install-tools # Install additional tools such as linters
28
+
hereby generate # Generate all Go code (e.g. diagnostics, committed to repo)
29
+
```
30
+
31
+
Additional tasks are a work in progress.
32
+
33
+
`hereby` is not required to work on the repo; the regular `go` tooling (e.g., `go build`, `go test ./...`) will work as expected.
34
+
`hereby` tasks are provided as a convenience for those familiar with the TypeScript repo.
35
+
36
+
### Running `tsgo`
37
+
38
+
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc`.
39
+
40
+
### LSP Server
41
+
42
+
To debug and run the VS Code extension without installing it globally:
43
+
44
+
* Run VS Code in the repo workspace (`code .`)
45
+
* Copy `.vscode/launch.template.json` to `.vscode/launch.json`
46
+
* <kbd>F5</kbd> (or `Debug: Start Debugging` from the command palette)
47
+
48
+
This will launch a new VS Code instance which uses the Corsa LS as the backend. If correctly set up, you should see "tsgo" in the status bar when a TypeScript or JavaScript file is open:
49
+
50
+

0 commit comments