Skip to content

Instantly share code, notes, and snippets.

@abstractmachines
Created August 18, 2021 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abstractmachines/4d76ab8655f7746fcd2e2fb818ed1e00 to your computer and use it in GitHub Desktop.
Save abstractmachines/4d76ab8655f7746fcd2e2fb818ed1e00 to your computer and use it in GitHub Desktop.
VSCode Go Extension

How to keep VSCode's Go Extension from removing Go imports while developing

We would think this would be enough for VSCode's Go Linter/formatter, but nopes:

{
  "editor.formatOnSave": false,
}

We instead need to do this:

{
  "editor.formatOnSave": false,
  "[go]": {

          "editor.formatOnSave": false,
          "editor.codeActionsOnSave": {
              "source.organizeImports": false
          },
      }
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment