Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GoSublime go to definition

Does go to definition work in GoSublime 2 or 3 ?

I get only

GsDoc: no docs found

It is mentioned that that feature is available https://github.com/DisposaBoy/GoSublime

and documented https://github.com/DisposaBoy/GoSublime/blob/master/USAGE.md

But I found similar error reports year or two years old.

like image 792
Artem Avatar asked Feb 17 '14 14:02

Artem


People also ask

Does sublime support go?

Tooling integrationThe official sublime-build plugin provides integrations so you can execute common go commands (like go run , go test and go get ) without leaving your editor. You can install it like so: Open the Sublime Text command palette by pressing Ctrl+Shift+P .

How do I install GoSublime?

Install GoSublimeHit cmd + shift + p then type Install Package and select the install package option, then type GoSublime and select this package. You may already have the package. An easy way to check is to hit cmd + shift + p and type Remove Package then look for it, and hit esc if you see it.


2 Answers

Have a look at GoGuru. I have made a blog post how to setup ST3 for golang development.

like image 25
Arsham Avatar answered Sep 29 '22 23:09

Arsham


This go to definition only works with expression pkgname.Funcname, but the design(general interaction) is not implemented.

enter image description here

By other way you must have the source code in the GOPATH or GOROOT, if not GoSublime cannot find your code.

You can read more about at: https://github.com/DisposaBoy/GoSublime/issues/62

like image 174
mcuadros Avatar answered Sep 29 '22 23:09

mcuadros