Skip to content

Determine Usage with IntelliJ #2

@67726e

Description

@67726e

Figure out how to get syntax highlighting with IntelliJ. Things like the constructor @(body: Html) are presently highlighted as errors because IntelliJ cannot resolve the class Html. We also have import/resolution issues when using sibling templates.

With the structure and code presented below, we receive a syntax error indicating that base is not resolved inside of index.

twirl/base.scala.html
twirl/index.scala.html
@* base.scala.html *@
@(title: String)(body: Html)
<div>@body</div>
@* index.scala.html *@
@()
@* body highlights as an error *@
@body("Title") {
  <h2>Hello, World</h2>
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions