Closed devMYC closed 5 years ago
This was unfortunately one of the features that got lost after the switch from nsf/gocode.
I'm planning to investigate a more general solution that auto-imports packages while you type but I probably won't get to that until next week.
Relevant issue: https://github.com/KurokuLabs/margo/issues/62
@DisposaBoy Glad to hear that you're working on it. Appreciate the hard work man!
This is now implemented in the latest version of GoSublime
Confirmed, it's now working!
This is now implemented in the latest version of GoSublime
But works only with Golang 1.11+, because this command, doesn't work with earlier versions.
[root@virt ~]# go version
go version go1.10.3 linux/amd64
[root@virt ~]# go list -find -e -f={{.Name}},{{.ImportPath}} std
flag provided but not defined: -find
usage: list [-e] [-f format] [-json] [build flags] [packages]
Run 'go help list' for details.
[root@virt ~]# go version
go version go1.11 linux/amd64
[root@virt ~]# go list -find -e -f={{.Name}},{{.ImportPath}} std
tar,archive/tar
zip,archive/zip
bufio,bufio
bytes,bytes
bzip2,compress/bzip2
flate,compress/flate
...
go1.10 support should be fixed in GoSublime 18.11.06.
Auto completion works fine when packages are imported, and it used to work on unimported packages as well. Not sure if I set something wrong, this is my
margo.go
file: