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

formatting: reconsider goreturns as the default #192

Closed
stamblerre opened this issue Jun 9, 2020 · 4 comments
Closed

formatting: reconsider goreturns as the default #192

stamblerre opened this issue Jun 9, 2020 · 4 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@stamblerre
Copy link
Contributor

goreturns has not been ported to work with modules. It seems that we should either send a PR that does the port, or we should change the default formatting tool.

@stamblerre stamblerre added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 9, 2020
@hyangah
Copy link
Contributor

hyangah commented Jun 17, 2020

My understanding is that go.formatTool applies only when language server (gopls) is not used. And we are recommending gopls when users use modules mode.

Should we bother?

@stamblerre
Copy link
Contributor Author

That's fair, it may not be worth it. It just seemed a bit strange to me that our out-of-the-box formatting wouldn't work (if you first downloaded the extension without immediately opting into gopls).

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/244542 mentions this issue: src/goModules.ts: prompt format tool switch conditionally

gopherbot pushed a commit that referenced this issue Jul 23, 2020
Instead of offering multiple prompts at the same time,
trigger the format tool switch prompt only if the user
declines the use of language server.

format tool choice is irrelevant when using the language
server, and multiple prompts are distracting.

Updates #192

Change-Id: Ib6cd19ca00ba685ded016524ec8693cb1f07dfa4
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/244542
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
@hyangah hyangah added this to the Backlog milestone Aug 7, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/300431 mentions this issue: package.json: change the default format tool to goimports

@hyangah hyangah modified the milestones: Backlog, v0.23.1 Mar 10, 2021
@golang golang locked and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants