Search code examples
eclipseplayframework-2.0scala-ide

Code formatter for Play's .scala.html template files


The Play Framework is a web framework for Scala and Java. Its Scala interface uses .scala.html template files for automatically generating HTML files. Is there a tool for automatically formatting these files?

Some more context: In Eclipse, with the Scala and Play plugins, the formatter can automatically format Scala source files and the routes file, but it does nothing on .scala.html files.


Solution

  • IntelliJ IDEA is able to format Scala templates.

    There is an open feature request for the ScalaIDE Play plugin for formatting Scala Templates:

    https://github.com/scala-ide/scala-ide-play2/issues/118