eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

Read a default config file from .ceylon directory #32

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

I think it would make sense to read a default configuration file from the .ceylon directory. Open questions:

lucaswerkmeister commented 10 years ago

I actually kinda like the idea of adding a [formatter] section to the config file. The Ceylon config file format is a bit more permissive than my current format (spacing, comments after options), but that should be no problem.

Two potential problems:

  1. Am I allowed to add a section to the config file? This is, after all, an external tool.
  2. [formatter] is very generic. The IntelliJ IDE people are, it seems, writing their own version of a formatter. We should try to sync the options anyways, but a [formatter] section in the config file would force us to do this. (Which might be a good thing – consistent formatting across two IDEs and a command line tool with only one config file sounds great to me.)
lucaswerkmeister commented 10 years ago

@gavinking what do you think? Can I put this into the config file, or should I have a file just for the formatter? (I’d like to settle this before the 1.0.0 release, if possible.)

gavinking commented 10 years ago

It's fine by me. I simply don't have a strong opinion.

lucaswerkmeister commented 10 years ago

I’m glad you say that, since I was bored on saturday and already implemented it :)