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

fmt: adjust imports after formatting on autosave #3154

Merged
merged 1 commit into from
Feb 10, 2021

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Feb 10, 2021

Order matters when formatting and adjusting imports, because of gopls'
support for gofumpt. Gofumpt formatting will group all imports that look
like a stdlib package (e.g. there's no '.' in the package path)
together. When the local setting is provided, the only way to get the
local imports grouped separately when gofumpt is used to format is to
format first and then organize imports.

Fixes #3151

Order matters when formatting and adjusting imports, because of gopls'
support for gofumpt. Gofumpt formatting will group all imports that look
like a stdlib package (e.g. there's no '.' in the package path)
together. When the local setting is provided, the only way to get the
local imports grouped separately when gofumpt is used to format is to
format first and then organize imports.

Fixes fatih#3151
@bhcleek bhcleek merged commit 58bae2b into fatih:master Feb 10, 2021
@bhcleek bhcleek added this to the vim-go 1.25 milestone Feb 10, 2021
@bhcleek bhcleek deleted the fmt/format-before-adjusting-imports branch February 10, 2021 05:35
bhcleek added a commit that referenced this pull request Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When go_gopls_fumpt is enabled, go_gopls_local has no effect
1 participant