scala - Intellij code style to align single-line comments -


right intellij's autoformat changes this:

    val reducefn = (left: u, right: u) => {       left ++ right                         // comment 1               .myfunca( _._1 )              // comment 2               .myfuncabc {                  // comment 3                 g => {                      // comment 4                   g.myfun                                      ._2                                          .myfunbbb( 0 )( _ + _ )                    }               }     }: u                                    // comment 5 

to this:

    val reducefn = (left: u, right: u) => {       left ++ right // comment 1               .myfunca( _._1 ) // comment 2               .myfuncabc {                 // comment 3                 g => {                   // comment 4                   g.myfun                    ._2                    .myfunbbb( 0 )( _ + _ )                  }               }     }: u // comment 5 

is there way can tell intellij produce, or, @ least, not clobber former style? don't see comments option in code style in editor > code style > scala:

enter image description here

unfortunately, don't think supported @ moment. there's ticket (scl-4269), of writing there has not been real activity on it.

you can disable formatter lines using formatter control option (cf. code style preference page). that's not solution.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -