@@ -15,6 +15,14 @@ steps:
16 # add_language_pragma: true
16 # add_language_pragma: true
18+ # Align the right hand side of some elements. This is quite conservative
19+ # and only applies to statements where each element occupies a single
23+ top_level_patterns: false
18 # Import cleanup
26 # Import cleanup
19 - imports:
27 - imports:
20 # There are different ways we can align names and lists.
28 # There are different ways we can align names and lists.
@@ -33,6 +41,91 @@ steps:
33 # Default: global.
41 # Default: global.
34 align: global
42 align: global
44+ # Folowing options affect only import list alignment.
46+ # List align has following options:
48+ # - after_alias: Import list is aligned with end of import including
49+ # 'as' and 'hiding' keywords.
51+ # > import qualified Data.List as List (concat, foldl, foldr, head,
52+ # > init, last, length)
54+ # - with_alias: Import list is aligned with start of alias or hiding.
56+ # > import qualified Data.List as List (concat, foldl, foldr, head,
57+ # > init, last, length)
59+ # - new_line: Import list starts always on new line.
61+ # > import qualified Data.List as List
62+ # > (concat, foldl, foldr, head, init, last, length)
64+ # Default: after_alias
67+ # Long list align style takes effect when import is too long. This is
68+ # determined by 'columns' setting.
70+ # - inline: This option will put as much specs on same line as possible.
72+ # - new_line: Import list will start on new line.
74+ # - new_line_multiline: Import list will start on new line when it's
75+ # short enough to fit to single line. Otherwise it'll be multiline.
77+ # - multiline: One line per import list entry.
78+ # Type with contructor list acts like single import.
80+ # > import qualified Data.Map as M
88+ long_list_align: new_line
90+ # Align empty list (importing instances)
92+ # Empty list align has following options
94+ # - inherit: inherit list_align setting
96+ # - right_after: () is right after the module name:
98+ # > import Vector.Instances ()
101+ empty_list_align: right_after
103+ # List padding determines indentation of import list on lines after import.
104+ # This option affects 'long_list_align'.
106+ # - <integer>: constant value
108+ # - module_name: align under start of module name.
109+ # Useful for 'file' and 'group' align settings.
110+ list_padding: module_name
112+ # Separate lists option affects formating of import list for type
113+ # or class. The only difference is single space between type and list
114+ # of constructors, selectors and class functions.
116+ # - true: There is single space between Foldable type and list of it's
119+ # > import Data.Foldable (Foldable (fold, foldl, foldMap))
121+ # - false: There is no space between Foldable type and list of it's
124+ # > import Data.Foldable (Foldable(fold, foldl, foldMap))
127+ separate_lists: true
36 # Language pragmas
129 # Language pragmas
37 - language_pragmas:
130 - language_pragmas:
38 # We can generate different styles of language pragma lists.
131 # We can generate different styles of language pragma lists.
@@ -47,13 +140,20 @@ steps:
47 # Default: vertical.
140 # Default: vertical.
48 style: vertical
141 style: vertical
143+ # Align affects alignment of closing pragma brackets.
145+ # - true: Brackets are aligned in same collumn.
147+ # - false: Brackets are not aligned together. There is only one space
148+ # between actual import and closing bracket.
50 # stylish-haskell can detect redundancy of some language pragmas. If this
153 # stylish-haskell can detect redundancy of some language pragmas. If this
51 # is set to true, it will remove those redundant pragmas. Default: true.
154 # is set to true, it will remove those redundant pragmas. Default: true.
52 remove_redundant: true
155 remove_redundant: true
54− # Align the types in record declarations
57 # Replace tabs by spaces. This is disabled by default.
157 # Replace tabs by spaces. This is disabled by default.
58 # - tabs:
158 # - tabs:
59 # # Number of spaces to use for each tab. Default: 8, as specified by the
159 # # Number of spaces to use for each tab. Default: 8, as specified by the
@@ -67,11 +167,23 @@ steps:
67# to. Different steps take this into account. Default: 80.
167# to. Different steps take this into account. Default: 80.
68columns: 80
168columns: 80
170+# By default, line endings are converted according to the OS. You can override
171+# preferred format here.
173+# - native: Native newline format. CRLF on Windows, LF on other OSes.
175+# - lf: Convert to LF ("\n").
177+# - crlf: Convert to CRLF ("\r\n").
70# Sometimes, language extensions are specified in a cabal file or from the
182# Sometimes, language extensions are specified in a cabal file or from the
71# command line instead of using language pragmas in the file. stylish-haskell
183# command line instead of using language pragmas in the file. stylish-haskell
72# needs to be aware of these, so it can parse the file correctly.
184# needs to be aware of these, so it can parse the file correctly.
74# No language extensions are enabled by default.
186# No language extensions are enabled by default.
75−language_extensions:
187+# language_extensions:
76− - TemplateHaskell
188+ # - TemplateHaskell
77− - QuasiQuotes
189+ # - QuasiQuotes