Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: group imports together for the local module #32049

Open
gracenoah opened this issue May 15, 2019 · 1 comment

Comments

Projects
None yet
5 participants
@gracenoah
Copy link

commented May 15, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

not relevant

What did you do?

Saved a file in vs code (configured to use gopls), letting gopls fix imports.

What did you expect to see?

Imports grouped into 3 sections: standard library imports, third party library imports, local module imports

What did you see instead?

Only two sections: standard library imports, all other imports


Maybe this is a bike-sheddy style question, but I would like to be able to use gopls but also stick to the old goimports -local x behaviour of splitting local dependencies out.

If it's too controversial, I'd be happy with a flag, but maybe it's simple enough to make this behaviour default, especially now that go modules make it clear what's "local".

@gopherbot gopherbot added this to the Unreleased milestone May 15, 2019

@gopherbot gopherbot added the gopls label May 15, 2019

@stamblerre

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

I think this is ultimately something that we would put behind a config (even if it is on by default). We intend to add different configurations to formatting and imports, but first we will need to fix #30843.

@stamblerre stamblerre changed the title x/tools/cmd/gopls: group imports together for the local module x/tools/gopls: group imports together for the local module Jul 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.