Skip to content
A Go language server.
Branch: master
Clone or download
Pull request Compare This branch is 13 commits ahead, 507 commits behind microsoft:master.
caseyflynn-google and svenefftinge Allow users to specify clientProcessId
Currently if a clientProcessId is provided, the program prints and error
to stdio (which will disrupt connections made via stdio).

Signed-off-by: Casey Flynn <caseyflynn@google.com>
Latest commit efa486b Mar 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Enable vscode bot Jan 23, 2018
.vscode [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
images code coverage: Added a gutter decorator and bugfix (microsoft#1059) Jul 10, 2017
scripts Fix microsoft#438 When debug process is stopped kill all processes st… Feb 6, 2017
snippets sync fork upstream Oct 15, 2018 last Feb 27, 2019
src-ignored [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
src-vscode-mock Allow users to specify clientProcessId Mar 25, 2019
src active go Package initial control Feb 27, 2019
test-lsp [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
test Fix flaky fill struct test Feb 27, 2018
typings
.editorconfig Add .editorconfig Mar 27, 2016
.gitignore [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
.travis.yml
.vscodeignore First test Oct 29, 2015
CHANGELOG.md 0.6.77 release Feb 20, 2018
Go-latest.vsix Use guru implements both ways microsoft#1536 Feb 28, 2018
LICENSE Add LICENSE Oct 14, 2015
README.md upgrade prerequisites documentation Feb 27, 2019
README_old.md [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
go-commands.md [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
package-lock.json fixed lint on vs-code mock Feb 19, 2019
package.json active go Package initial control Feb 27, 2019
thirdpartynotices.txt [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
tsconfig.json [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
tslint.json [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018
vscode-api.txt [releng] Rebased and squashed to latest master on vscode/go Mar 1, 2018

README.md

A Go Language Server based on the Go Extension for Visual Studio Code

Wraps the VSCode Go extension from Microsoft into a language server, such that its functionality can be reused with other LSP-aware clients.

In the first iteration we will mock VSCode APIs or simulate their behavior backed by an LSP. We will maintain this as a fork of the original repository such that we can easily pick up incoming improvements of that by just rebasing. Once we got more confidence, we'd probably refactor the VSCode specific parts away.

Original README.md.

Mismatches and Challenges

  • There is no such thing as the activeTextEditor in LSP. For services that have a TextDocumentItem, we set it before calling the service impl, but for other services, e.g. executeCommand we cannot make sure that they are performed on the correct document.
  • We have to use/mock/adapt a lot of global variables

Prerequisites

Make sure the go command is available from your path and that the GOPATH environment variable points to where your go packages are installed. Some go packages are necessary:

go get -u -v github.com/nsf/gocode
go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
go get -u -v github.com/ramya-rao-a/go-outline
go get -u -v github.com/acroca/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/haya14busa/goplay/cmd/goplay
go get -u -v github.com/josharian/impl
go get -u -v github.com/tylerb/gotype-live
go get -u -v github.com/rogpeppe/godef
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v github.com/zmb3/gogetdoc
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v sourcegraph.com/sqs/goreturns
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/cweill/gotests/...
go get -u -v github.com/alecthomas/gometalinter
go get -u -v honnef.co/go/tools/...
go get -u -v github.com/sourcegraph/go-langserver
go get -u -v github.com/derekparker/delve/cmd/dlv
go get -u -v github.com/davidrjenni/reftools/cmd/fillstruc

Note: this list comes from here.

Build and usage

  1. Run npm install to install the package dependencies.
  2. Run npm run compile to compile the Typescript to Javascript.
  3. Run the server with node ./out/src-vscode-mock/cli.js --stdio.
You can’t perform that action at this time.