Side by side
goimports vs Ormolu
Both stand on code formatting tools. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan LinuxMacWeb+1
goimports combines import cleanup with gofmt-style formatting and can fit into several documented editor workflows. Its directory exclusions use a deliberately limited file format, and the package page notes that its listed version is not the latest in its module.
Visit goimports Free plan LinuxMacWeb+1
Ormolu provides a single-style formatter for Haskell with command-line, browser, editor, and language-server paths. Its fixed style may not fit projects that need configurable formatting, and CPP handling is limited.
Visit OrmoluThe facts
| goimports | Ormolu | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Linux, Mac, Web, Windows | Linux, Mac, Web, Windows |
| Lowest paid plan | Free or on request | Free or on request |
| Plans published | 1 | 1 |
| Maker | Not published | Not published |
| Website | pkg.go.dev | github.com |
| On code formatting tools | #10 of 34 | #14 of 34 |
goimports: what it does well
- Adds missing imports and removes unreferenced ones.
- Formats code in the gofmt style.
- Documented integrations include Emacs, Vim, and GoSublime.
- Free, redistributable, and licensed under BSD-3-Clause.
What to know first
- Ignore files do not support globbing or regular expressions.
- The listed package version is not the latest in its module.
Ormolu: what it does well
- Uses GHC's parser
- Offers binaries for Linux, macOS, and Windows
- Works with Emacs, VS Code, and Vim integrations
- Haskell Language Server has built-in formatter support
- Can read defaults from a matching Cabal file
What to know first
- Formatting style cannot be configured
- CPP support is experimental
- CPP support is limited to simple top-level conditionals
Alternatives to goimports Alternatives to Ormolu The whole list