FREEDOM251

Freedom251 › Compare

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.

goimports

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

Ormolu

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 Ormolu

The facts

goimportsOrmolu
Free planYesYes
Open sourceNot publishedNot published
Runs onLinux, Mac, Web, WindowsLinux, Mac, Web, Windows
Lowest paid planFree or on requestFree or on request
Plans published11
MakerNot publishedNot published
Websitepkg.go.devgithub.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