-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/settings: make the custom formatter support more visible
Custom formatter support was added in #1238. But due to the limitation in the VS Code setting UI (which assumes the acceptable values list is static) and the setting validation logic (VS Code thinks it's an error to use a value outside of the supplied enum list is invalid), this is not visible to users. Instead, this change introduces an extra enum 'custom' for the "go.formatTool" setting. If this is chosen, the extension uses the tool specified as `customFormatter` in the "go.alternateTools" setting section for formatting. The extension expects the custom formatter to accept input as STDIN and output the result as STDOUT. Users can also supply "go.formatFlags". Changed the descriptions to use markdown - which allows to reference other settings ("`#...#`"). The document generation tool does not handle this special syntax nicely but I hope this isn't too confusing. I wish we could add an extra validation on the allowed value for "go.formatTool" in favor of this new 'custom' option. I am not adding the validation in this CL because there could be users who depend on this behavior. For #1238 For #1603 For #2503 Change-Id: I5d9564f331845b6b07f0b54148834118404f3553 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/446298 Reviewed-by: Jamal Carvalho <jamal@golang.org> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
- Loading branch information
Showing
4 changed files
with
52 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters