Closed chew351 closed 5 years ago
Does vim-go autocomplete support import dot package like import "./mypackage"
Thanks
relative imports are not supported by gopls
at all. The issue this comment is on is for for something different, but the explanation about relative import support is here: https://github.com/golang/go/issues/31837#issuecomment-489769149
Thanks for the details, I understand now
At 2019-05-10 01:08:07, "Billie Cleek" notifications@github.com wrote:
relative imports are not supported by gopls at all. The issue this comment is on is for for something different, but the explanation about relative import support is here: golang/go#31837 (comment)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
What did you do? (required: The issue will be closed when not provided)
project foo a/clnt.go <--- package a b/clnt.go <---- package b main.go
main.go file:
package foo
import "fmt"
import "./a" <--- import a dot package import "./b" <--- import a dot package
func main() { fmt. fmt.Println("vim-go") a.Clnt() b.Clnt() } -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)
when import a local package like import "./mypackage" <c+x><c+o> was blocked
What did you expect to happen?
when import a local package like import "./mypackage" <c+x><c+o> can autocomplete
What happened instead?
when import a local package like import "./mypackage" <c+x><c+o> cause vim blocked
Configuration (MUST fill this out):
vim-go version:
root@work:~/.vim/bundle/vim-go# git log -p commit c4b419db6c57125e91d6f292daa664b73b155b7b (HEAD -> master, origin/master, origin/HEAD) Author: Billie Cleek bhcleek@gmail.com Date: Mon May 6 18:33:16 2019 -0700
vimrc
you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):vimrc
Vim version (first three lines from
:version
):vim8.1 on ubuntu18
Go version (
go version
):root@work:~/.vim/bundle/vim-go# go version go version go1.12.4 linux/amd64
Go environment
go env
Output: