diff options
author | Maxim Koltsov <kolmax94@gmail.com> | 2020-02-17 19:32:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 19:32:01 +0100 |
commit | b8a731eb948b98019b8663c6fc653d2c930df2b1 (patch) | |
tree | ac2b95867755910564075caac605636e9babcaf7 /data | |
parent | ab85690eb35dec46c8eb80a930337249f34b9f80 (diff) | |
download | stylish-haskell-b8a731eb948b98019b8663c6fc653d2c930df2b1.tar.gz |
Introduce nicer style for records (#266)
Diffstat (limited to 'data')
-rw-r--r-- | data/stylish-haskell.yaml | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/data/stylish-haskell.yaml b/data/stylish-haskell.yaml index 209d613..d7de260 100644 --- a/data/stylish-haskell.yaml +++ b/data/stylish-haskell.yaml @@ -15,8 +15,33 @@ steps: # # true. # add_language_pragma: true - # Format record definitions - - records: {} + # Format record definitions. This is disabled by default. + # + # You can control the layout of record fields. The only rules that can't be configured + # are these: + # + # - "|" is always aligned with "=" + # - "," in fields is always aligned with "{" + # - "}" is likewise always aligned with "{" + # + # - records: + # # How to format equals sign between type constructor and data constructor. + # # Possible values: + # # - "same_line" -- leave "=" AND data constructor on the same line as the type constructor. + # # - "indent N" -- insert a new line and N spaces from the beginning of the next line. + # equals: "indent 2" + # + # # How to format first field of each record constructor. + # # Possible values: + # # - "same_line" -- "{" and first field goes on the same line as the data constructor. + # # - "indent N" -- insert a new line and N spaces from the beginning of the data constructor + # first_field: "indent 2" + # + # # How many spaces to insert between the column with "," and the beginning of the comment in the next line. + # field_comment: 2 + # + # # How many spaces to insert before "deriving" clause. Deriving clauses are always on separate lines. + # deriving: 2 # Align the right hand side of some elements. This is quite conservative # and only applies to statements where each element occupies a single @@ -225,9 +250,6 @@ steps: # simple_align but is a bit less conservative. # - squash: {} -# A common indentation setting. Different steps take this into account. -indent: 4 - # A common setting is the number of columns (parts of) code will be wrapped # to. Different steps take this into account. # |