debug vim install
Opened this issue · 0 comments
Hello, I've searched through issues and been looking for help with getting autocomplete setup with Vundle, but I've had no luck. I believe my GOROOT
and GOPATH
env vars are set correctly, and when I manually call the gocode daemon, I get a response but I'm not really sure how to further debug.
For reference, here are my GOROOT
and `GOPATH outputs:
$ echo $GOPATH
/Users/<user>/os/go
$ echo $GOROOT
/usr/local/go
If I run gocode manually using a command like this, I get the following output:
$ gocode -f=json --in=main.go autocomplete 14
[0, [{"class": "func", "name": "main", "type": "func()", "package": ""}, {"class": "type", "name": "Configuration", "type": "struct", "package": ""}]]
This is what the output of gocode close && gocode -s -debug
looks like when I run that. Otherwise I see no output from the debug mode even when I am using go files in vim.
2018/01/15 20:02:15 Go project path: github.com/phouse512/boom
2018/01/15 20:02:15 Got autocompletion request for '/Users/<user>/os/go/src/github.com/phouse512/boom/main.go'
2018/01/15 20:02:15 Cursor at: 14
2018/01/15 20:02:15 -------------------------------------------------------
package main
#import (
"fmt"
"github.com/urfave/cli"
"os"
)
type Configuration struct {
}
func main() {
app := cli.NewApp()
app.Name = "boom"
app.Usage = "Here's how you use boom"
app.Action = func(c *cli.Context) error {
fmt.Println("Not sure.")
return nil
}
app.Run(os.Args)
}
2018/01/15 20:02:15 -------------------------------------------------------
2018/01/15 20:02:15 Error parsing input file (outer block):
2018/01/15 20:02:15 3:1: expected declaration, found ';'
2018/01/15 20:02:15 Offset: 0
2018/01/15 20:02:15 Number of candidates found: 2
2018/01/15 20:02:15 Candidates are:
2018/01/15 20:02:15 func main()
2018/01/15 20:02:15 type Configuration struct
2018/01/15 20:02:15 =======================================================
I'm aware that this might be an issue with the Vundle install as well, but I just wanted to make sure that there wasn't anything blatantly wrong with my usage of gocode
. Maybe I am not sure what is supposed to know what happens when I open a go file - but when I start typing, nothing comes up.
Any help would be appreciated!