Skip to content
SPECIFICTION
Get listed

dprint vs Scalafmt

dprint

dprint.dev

Scalafmt

scalameta.org

Side by side

FiguredprintScalafmt
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYesYes
Plans published11
Spec score · Code Formatting Tools8.1 (#7)7.6 (#22)
ConfigurationProjects use dprint.json, dprint.jsonc, .dprint.json or .dprint.jsonc files to define plugins, formatting settings, includes and excludes.Formatting options are set in a plain text .scalafmt.conf file using HOCON syntax.
Editor integrationsThe installation guide lists Visual Studio Code, IntelliJ and Neovim integrations, with the dprint language-server command usable by other editors.The documentation describes use with IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text, and Eclipse, with Metals supporting formatting requests from editors.
LicenseThe dprint GitHub repository is marked MIT licensed.The GitHub repository identifies the project license as Apache-2.0.
Purposedprint is a command-line application that automatically formats code.Scalafmt is a code formatter for Scala that formats code consistently across a team.
SecurityWasm plugins run sandboxed without access to the network or file system.The official Scalafmt pages opened for this research do not state security certifications or compliance claims.
SupportThe official contact page directs users to email [email protected].The project site links to a community Discord and GitHub, and the CLI help directs bug reports to GitHub issues.

Plans

dprint

  • Open source dprintFree

dprint pricing →

Scalafmt

  • FreeFree

Scalafmt pricing →

In their own words

dprint

dprint is a command-line application that automatically formats code through a configurable, pluggable system built with Rust and WebAssembly. Its official and wrapper plugins cover languages and formats including TypeScript, JavaScript, JSON, Markdown, TOML, CSS, Dockerfile, C#, Python, Go, Swift, GraphQL, YAML, PHP, LaTeX, R, and Julia. Project configuration files define plugins, formatting settings, included files, and exclusions. Plugins can be loaded from a URL or file path and pinned or versioned in configuration. The project says dprint formats hundreds of files in milliseconds and enables incremental caching by default. WebAssembly plugins run in a sandbox without network or file-system access, while process plugins are executable files and are not sandboxed. Editor integrations are listed for Visual Studio Code, IntelliJ, and Neovim; the language-server command can also be used by other editors. The CLI is distributed as a static binary with no runtime dependencies, with installation options including shell, PowerShell, Cargo, npm, and Homebrew. It is MIT-licensed and free.

Visit dprint.dev

Scalafmt

Scalafmt is a free Scala code formatter for keeping formatting consistent across a team. It handles Scala 2, Scala 3, sbt files and Scala scripts, with one dialect selected for each file. Formatting options are stored in a plain-text .scalafmt.conf file using HOCON syntax. Since version 3.1.0, the configuration must explicitly specify both the version and runner.dialect. Scalafmt can run from an editor, build tool or terminal. Documented editor integrations include IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text and Eclipse; Metals supports formatting requests from editors. It integrates with sbt and documents integrations for Maven, Gradle and Mill. Command-line check and test modes report misformatted code without writing changes. It also supports ignoring files, changed-lines formatting and a library API. IntelliJ range formatting uses IntelliJ’s own formatter by default: Scalafmt is designed primarily for whole files, and selected ranges may produce undesirable results. The project license is Apache-2.0.

Visit scalameta.org