Giter VIP home page Giter VIP logo

xserver-golang's Introduction

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.

xserver-golang's People

Contributors

ramya-rao-a avatar lukehoban avatar egamma avatar uudashr avatar tampajohn avatar roblourens avatar ironcladlou avatar newhook avatar leaxoy avatar jankoehnlein avatar avelino avatar goenning avatar f0zi avatar sijad avatar nwolber avatar tylerb avatar zippoxer avatar mattetti avatar bredov avatar abarisain avatar thesoenke avatar netroby avatar kieferrm avatar yuntan avatar codmajik avatar thomasdarimont avatar kode4food avatar svenefftinge avatar rafax avatar slomek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.