Can't disable AutoFormat, at the same time, enable autoImport. #2902
Comments
Thanks for reporting @jinzihao123 cc @stamblerre |
@jinzihao123: I expect you will be able to achieve this by removing this setting: "go.languageServerExperimentalFeatures": {
"format": false,
}, VS Code will fall back to formatting your file with the default |
@ramya-rao-a: This issue is closely related to the discussion on #2446, so perhaps this one can be closed as a duplicate? |
@stamblerre This is the case of not wanting formatting on save (neither by gopls nor by the extension), but wanting the "organize imports" features that would add missing imports, remove unused imports and re-order imports if needed. Therefore, I see this as separate from #2446 |
|
Thanks @stamblerre @jinzihao123 Can you try with the latest
|
This issue has been closed automatically because it needs more information and has not had recent activity. Thank you for your contributions. |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gogo version go1.13 linux/amd64
code -v
orcode-insiders -v
to get version of VS Code or VS Code InsidersVersion: 1.40.0
Commit: 86405ea23e3937316009fc27c9361deee66ffbf5
Date: 2019-11-06T17:09:34.601Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.6.0
0.11.9
go env GOOS GOARCH
to get the operating system and processor arhcitecture detailslinux
amd64
Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
prefixes.Describe the bug
A clear and concise description of what the bug.
I need to disable AutoFormat, at the same time, enable autoImport.
I set
formatOnSave still works.
If I set
Both formatOnSave and autoImport not working.
A clear and concise description of what you expected to happen.
Disable AutoFormat, at the same time, enable autoImport.
The text was updated successfully, but these errors were encountered: