eclipse-archived / ceylon.formatter

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

LineBreakStrategy: respect tab width #19

Open lucaswerkmeister opened 10 years ago

lucaswerkmeister commented 10 years ago

The DefaultLineBreaks should definitely count tabs as the correct amount of columns. The width of a tab can be retrieved from options.indentMode, or should default to 4 in the case of Spaces.

lucaswerkmeister commented 10 years ago

Actually… that doesn’t make much sense. The only tokens that could contain tabs are string literals, and even there’s it’s probably extremely uncommon. Of course, the line can start indented with tabs, but that’s not something that DefaultLineBreaks has to worry about.

lucaswerkmeister commented 10 years ago

To clarify, the tabs at the start of the line (indentation) are already accounted for. With this in mind, I’ll say that for now, this issue isn’t worth the trouble (and increase in running time), and remove the “bug” tag and the milestone.