José Valim
480c19cb5b
Respect keywords in access in code formatter
2021-05-11 12:37:58 +02:00
José Valim
d57ec28285
Do not break inside interpolation
...
Closes #10587
2021-01-02 16:20:39 +01:00
José Valim
1a4efb79a1
Reduce the newlines count when they are immediately followed by a comment, closes #9873
2020-03-13 11:27:06 +01:00
fieldinrain
0883353f72
Fix defstruct code formatting with inline comments ( #9358 )
2019-09-26 17:43:41 -05:00
José Valim
faefb0b882
Exposing pairing metadata ( #9146 )
...
This introduces five new metadata nodes:
* `do` - contains metadata about do location in a function call with
`do/end` blocks
* `end` - contains metadata about end location in a function call with
`do/end` blocks
* `closing` - contains metadata about the closing pair, such as a `}`
in a tuple or in a map, or such as the closing `)` in a function call
with parens
* `eol` - is set to true when the opening pair, such as `{` or `(`, are
followed by the end of the line
* `delimiter` - contains the opening for sigils (such as `"{"`, `"/"`,
etc)
2019-06-17 16:38:52 +02:00
José Valim
4db36e08d7
Do not force clauses with comments to be unfit ( #7843 )
2018-07-09 12:54:50 +02:00
Sihui Huang
47f1107a7a
When fn is followed by a newline, use multi-clause formatting style ( #7737 )
2018-06-10 17:45:02 +02:00
José Valim
12153869c5
Support comments in the middle of pipelines and type expressions
...
Closes #7231
2018-01-24 13:09:19 +01:00
José Valim
5ea7321562
Consider comments inside function calls
...
Closes #6994
2017-11-07 10:50:11 +01:00
José Valim
7f8136915f
Treat => and : as operators in the formatter
...
This means that the right side will break on its own line
when it doesn't fit and be indented by two spaces.
Closes #6976 .
2017-10-26 12:43:02 +02:00
José Valim
baeed3a69e
Recognize hashbangs in the formatter
...
Those are known instructions in UNIX systems.
Closes #6969 .
2017-10-24 14:00:10 +02:00
José Valim
31a0e1d5f0
Format more pending files and ensure proper clause args break
2017-10-11 14:28:13 +02:00
José Valim
107859b375
Format all files that have less than 10 entries in myers difference
2017-10-10 16:00:50 +02:00
José Valim
9bc24ee7f2
Add code formatter ( #6639 )
2017-10-07 15:33:46 +02:00