CampagneLaboratory / MetaR

Simple Data Analysis language built with MPS. Generates R code. Metaprogramming in R, thus the name.
Other
51 stars 5 forks source link

RScript: Display expression blocks( {...}) on a new line #21

Open ghost opened 8 years ago

ghost commented 8 years ago

Many statements like if or while statements have a body. In case that the body is an expression block it should be placed on a new line to improve usability. It can be implemented with a indent collection and a condition:

indent-layout-on-new-line:(editorContext, node)->boolean{ 
  node.body.isInstanceOf(BodyExpr); 
}

This would of course need to be implemented in a more generic way.

Old version: screen shot 2016-08-02 at 4 13 13 pm New version: screen shot 2016-08-02 at 4 15 29 pm