node
is installed.node install @types/node
for the node runtime typesnode install typescript
.tsc
and node
are in your execution path.git clone vscode-lanuageserver-node.git
tsc go.ts && node go.js [-d dir] [-o out.go]
and for simple checking
gofmt -w out.go && golint out.go && go build out.go
-d dir
names the directory into which the vscode-languageserver-node
repository was cloned. It defaults to $(HOME)
.
-o out.go
says where the generated go code goes. It defaults to /tmp/tsprotocol.go
.
(The output file cannot yet be used to build gopls
. That will be fixed in a future CL.)
go.ts
uses the Typescript compiler's API, which is [introduced](https://github.com/Microsoft/TypeScript/wiki/Architectural-Overview API) in their wiki.