⭐️ A friendly language for building type-safe, scalable systems!

fix changelog

authored by giacomocavalieri.me and committed by Louis Pilfold ad4848b0 cdf0f922

Changed files
+101 -103
+101 -103
CHANGELOG.md
··· 2 2 3 3 ## Unreleased 4 4 5 - ### Formatter 6 - 7 - - The formatter now allows more control over how lists are split. By adding a 8 - trailing comma at the end of a list that can fit on a single line, the list 9 - will be split on multiple lines: 10 - 11 - ```gleam 12 - pub fn my_favourite_pokemon() -> List(String) { 13 - ["natu", "chimecho", "milotic",] 14 - } 15 - ``` 16 - 17 - Will be formatted as: 18 - 19 - ```gleam 20 - pub fn my_favourite_pokemon() -> List(String) { 21 - [ 22 - "natu", 23 - "chimecho", 24 - "milotic", 25 - ] 26 - } 27 - ``` 28 - 29 - By removing the trailing comma, the formatter will try and fit the list on a 30 - single line again: 31 - 32 - ```gleam 33 - pub fn my_favourite_pokemon() -> List(String) { 34 - [ 35 - "natu", 36 - "chimecho", 37 - "milotic" 38 - ] 39 - } 40 - ``` 41 - 42 - Will be formatted back to a single line: 43 - 44 - ```gleam 45 - pub fn my_favourite_pokemon() -> List(String) { 46 - ["natu", "chimecho", "milotic"] 47 - } 48 - ``` 49 - 50 - ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 51 - 52 - - The formatter now allows more control over how lists are formatted. 53 - If a list is split with multiple elements on the same line, removing the 54 - trailing comma will make sure the formatter keeps each item on its own line: 55 - 56 - ```gleam 57 - pub fn my_favourite_pokemon() -> List(String) { 58 - [ 59 - "This list was formatted", "keeping multiple elements on the same line", 60 - "notice how the formatting changes by removing the trailing comma ->" 61 - ] 62 - } 63 - ``` 64 - 65 - Is formatted as: 66 - 67 - ```gleam 68 - pub fn my_favourite_pokemon() -> List(String) { 69 - [ 70 - "This list was formatted", 71 - "keeping multiple elements on the same line", 72 - "notice how the formatting changes by removing the trailing comma ->", 73 - ] 74 - } 75 - ``` 76 - 77 - ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 78 - 79 - - The formatter no longer removes empty lines between list items. In case an 80 - empty line is added between list items they will all be split on multiple 81 - lines. For example: 82 - 83 - ```gleam 84 - pub fn main() { 85 - [ 86 - "natu", "xatu", 87 - 88 - "chimeco" 89 - ] 90 - } 91 - ``` 92 - 93 - Is formatted as: 94 - 95 - ```gleam 96 - pub fn main() { 97 - [ 98 - "natu", 99 - "xatu", 100 - 101 - "chimeco", 102 - ] 103 - } 104 - ``` 105 - 106 - ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 107 - 108 5 ### Compiler 109 6 110 7 - Generated JavaScript functions, constants, and custom type constructors now ··· 264 161 ### Language server 265 162 266 163 ### Formatter 164 + 165 + - The formatter now allows more control over how lists are split. By adding a 166 + trailing comma at the end of a list that can fit on a single line, the list 167 + will be split on multiple lines: 168 + 169 + ```gleam 170 + pub fn my_favourite_pokemon() -> List(String) { 171 + ["natu", "chimecho", "milotic",] 172 + } 173 + ``` 174 + 175 + Will be formatted as: 176 + 177 + ```gleam 178 + pub fn my_favourite_pokemon() -> List(String) { 179 + [ 180 + "natu", 181 + "chimecho", 182 + "milotic", 183 + ] 184 + } 185 + ``` 186 + 187 + By removing the trailing comma, the formatter will try and fit the list on a 188 + single line again: 189 + 190 + ```gleam 191 + pub fn my_favourite_pokemon() -> List(String) { 192 + [ 193 + "natu", 194 + "chimecho", 195 + "milotic" 196 + ] 197 + } 198 + ``` 199 + 200 + Will be formatted back to a single line: 201 + 202 + ```gleam 203 + pub fn my_favourite_pokemon() -> List(String) { 204 + ["natu", "chimecho", "milotic"] 205 + } 206 + ``` 207 + 208 + ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 209 + 210 + - The formatter now allows more control over how lists are formatted. 211 + If a list is split with multiple elements on the same line, removing the 212 + trailing comma will make sure the formatter keeps each item on its own line: 213 + 214 + ```gleam 215 + pub fn my_favourite_pokemon() -> List(String) { 216 + [ 217 + "This list was formatted", "keeping multiple elements on the same line", 218 + "notice how the formatting changes by removing the trailing comma ->" 219 + ] 220 + } 221 + ``` 222 + 223 + Is formatted as: 224 + 225 + ```gleam 226 + pub fn my_favourite_pokemon() -> List(String) { 227 + [ 228 + "This list was formatted", 229 + "keeping multiple elements on the same line", 230 + "notice how the formatting changes by removing the trailing comma ->", 231 + ] 232 + } 233 + ``` 234 + 235 + ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 236 + 237 + - The formatter no longer removes empty lines between list items. In case an 238 + empty line is added between list items they will all be split on multiple 239 + lines. For example: 240 + 241 + ```gleam 242 + pub fn main() { 243 + [ 244 + "natu", "xatu", 245 + 246 + "chimeco" 247 + ] 248 + } 249 + ``` 250 + 251 + Is formatted as: 252 + 253 + ```gleam 254 + pub fn main() { 255 + [ 256 + "natu", 257 + "xatu", 258 + 259 + "chimeco", 260 + ] 261 + } 262 + ``` 263 + 264 + ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 267 265 268 266 ### Bug fixes 269 267