Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Go Imports SorterNew to Visual Studio Code? Get it now.
Go Imports Sorter

Go Imports Sorter

Saxon Chuang

|
1,245 installs
| (2) | Free
VSCode extension for separating imports in go files into groups: standard, 3rd party, same domain, currenct project.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

go-imports-sorter

VSCode extension for separating imports in Go files into following groups:

  1. Standard library imports
  2. Third party imports
  3. Own library (belonging to the organization) imports.
  4. Self imports (import current project packages).

VSCode extension for separating imports in go files into groups: standard, 3rd party, same domain, current project.

Extension Settings

  • groupImports.onSave: automatically group imports on save. Default value is true.

Notes

  • This repo is fork from beerose/go-group-imports-vscode.
  • You can find and install this extension on marketplace

Last Update

  • feat: create an output channel to display grouped imports and formatted imports
  • feat: support single line and multi line comments in import block
  • fix: append slash before compare path, to detect own package name contains apart of root package (such like abc.org/pine and abc.org/pineapple)
  • fix: detect root package when file patch and GOPATH in different drive in windows
  • feat: support windows line ending
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft