bravoecho opened this issue
Jan 31, 2021
· 2 comments
Labels
goplsIssues related to the Go language server, gopls.NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
The goimports tool allows to specify the -local option multiple times. gopls imports has a local option to reproduce that, but it only seems to work for a single prefix (gopls docs)
Everything works as expected when only one prefix is specified.
What version of Go are you using (go version)?
$ go version
go version go1.15.7 darwin/amd64
$ gopls version
golang.org/x/tools/gopls v0.6.4
golang.org/x/tools/gopls@v0.6.4 h1:PO8rURGmi+QEKZ3pk+ZXJh51EFTVTSXqxzoRzrGSTJM=
Does this issue reproduce with the latest release?
✅
What operating system and processor architecture are you using (go env)?
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jan 31, 2021
stamblerre
changed the title
x/tools/gopls: Multiple locals for imports
x/tools/gopls: support multiple local values in the local prefix setting
Feb 2, 2021
goimports may allow you to specify the -local flag, but as far as I know, later values override, not add to, earlier values. The value of the flag is a comma separated list in both goimports and gopls. The gopls documentation should be updated.
goplsIssues related to the Go language server, gopls.NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
5 participants
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
The
goimports
tool allows to specify the-local
option multiple times.gopls imports
has alocal
option to reproduce that, but it only seems to work for a single prefix (gopls docs)Everything works as expected when only one prefix is specified.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In Vim, using the
vim-go
plugin, and setting the following options:What did you expect to see?
After saving any
.go
file:What did you see instead?
The text was updated successfully, but these errors were encountered: