saibing / bingo

Bingo is a Go language server that speaks Language Server Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I set GOPATH for bingo?

opened this issue · comments

Some projects are built using their own GOPATH.

VSCode Go extension allows to set GOPATH in settings.json.

How can I set GOPATH to a specific directory?

I prefer using bingo to gopls, since gopls doesn't provide find references (e.g. lsp-ui-peek-find-references).

@shpark

I think bingo or gopls already use vscode's GOPATH.

I have ported some features such as references, rename, workspace symbol, implementation of bingo to gopls.

You can try the enhanced version gopls https://github.com/saibing/tools.

@saibing Thanks for your response!

And sorry for the confusion. I am now using bingo with Emacs lsp-mode.

Can I manually set GOPATH for bingo or gopls for Emacs?

I took a look at customizable variables (i.e. customize-group) but I could not able to find appropriate variable name.

Also thank you for your recommendation. I will try your enhanced gopls tool!

@shpark

I feel very sorry that there is no good solution to this problem.

Maybe you can try to set the GOPATH on startup of emacs:

GOPATH=/gopathdir emacs

Oh, I got it. Thanks!