Guo
Guo

Reputation: 1813

How to custom code folding for Scala in intelliJ IDEA?

I have seen this blog: Custom code folding regions in IntelliJ

But it's useful for Java, it doesn't work on Scala.

Upvotes: 7

Views: 1963

Answers (1)

A0__oN
A0__oN

Reputation: 9110

To make that work what I do is add a new line after

  //<editor-fold desc="Description">

and before too

  //</editor-fold>

so it code will look like

  //<editor-fold desc="Description">

  def save() = {
    //save
  }

  def findOne() = {
    //fineOne
  }

  //</editor-fold>

If code folding is still not available you can delete > from //<editor-fold desc="Description"> and add it again and it will work.

I think its a bug and that's the workaround that I'm doing.

Upvotes: 13

Related Questions