[vscode-go] extension/package.json: set format on save mode to file

0 views
Skip to first unread message

Hongxiang Jiang (Gerrit)

unread,
Jun 8, 2026, 1:08:17 PMJun 8
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Madeline Kalil, golang...@luci-project-accounts.iam.gserviceaccount.com, Austin Clements, Alan Donovan, Alex Putman, golang-co...@googlegroups.com

Hongxiang Jiang submitted the change

Change information

Commit message:
extension/package.json: set format on save mode to file

The default formatter for language "go" is gopls and gopls does not
support modification based (range based) formatting.

Some other editor set the default value for "editor.formatOnSaveMode"
as "modificationsIfAvailable" which execute range based formatting
which is not supported by gopls. vscode set the default value to
"file".

This CL set the default value of "editor.formatOnSaveMode" in go file
to "file". The configuration does not impact other programming language
and can be overwritten by user through setting:

"[go]": {
"editor.formatOnSaveMode": "modificationsIfAvailable"
},
Change-Id: Iebb1aa8bb68956c6c886fd1eaf8a1472e848ee3c
Reviewed-by: Madeline Kalil <mka...@google.com>
Files:
  • M extension/package.json
Change size: XS
Delta: 1 file changed, 1 insertion(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: Iebb1aa8bb68956c6c886fd1eaf8a1472e848ee3c
Gerrit-Change-Number: 788040
Gerrit-PatchSet: 2
Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
Gerrit-CC: Alan Donovan <adon...@google.com>
Gerrit-CC: Alex Putman <apu...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages