dragos / typesafe-config-eclipse

An Eclipse plugin for Typesafe Config files
Apache License 2.0
23 stars 6 forks source link

Formatter behaviour #13

Open LupusUmbrae opened 7 years ago

LupusUmbrae commented 7 years ago

Not sure where the formatter settings for this come from in the Eclipse preferences as there is nothing under Hocon.

  1. I cannot tell it to use Spaces instead of tabs :(
  2. Running the formatter seems to constantly shift some elements to the right.. for instance:
fast {
......
    monitor = {
        interval = 1
        unit = MINUTES
        cpu = true
        memory = true
    }
...
}

Formating this twice i end up with:

fast{
....
    monitor = {
        interval =        1
        unit = MINUTES
        cpu =        true
        memory =        true
    }
...
}
dragos commented 7 years ago

There are not settings for formatting, unfortunately. I'll try to look into it over the weekend.

dragos commented 7 years ago

Formatting comes "for free" from Xtext, I guess the grammar has something that confuses the default formatter.

LupusUmbrae commented 7 years ago

I think the use spaces instead of tabs comes from the General editor (seems to be doing this now), just doesn't change them when i run the formatter, cheers