gleam format
principles
#1619
Replies: 5 comments 9 replies
-
Should here means:
value
|> io.debug
value
|> dynamic.from
|> io.debug
value
|> dynamic.from
|> dynamic.classify
|> io.debug becomes // value
// |> io.debug
// value
// |> dynamic.from
// |> io.debug
value
|> dynamic.from
|> dynamic.classify
|> io.debug becomes value
|> io.debug
value
|> dynamic.from
|> io.debug
value
|> dynamic.from
|> dynamic.classify
|> io.debug
Bad examples:
Good examples: value
|> foo.bar
|> quux.batz
|> kek.lul
|> more.here
value2
|> foo.bar
|> quux.batz
|> kek.lul
|> more.here let value1 = value1
|> foo.bar
|> quux.batz
|> kek.lul
|> more.here
let value2 = value2
|> foo.bar
|> quux.batz
|> kek.lul
|> more.here So to summarize:
|
Beta Was this translation helpful? Give feedback.
-
When autoformatting Elixir I noticed that it removes double margin lines above and below comments. That's a good feature IMHO: Leaving those comments as they are except for the collapse of possible margins to 1. |
Beta Was this translation helpful? Give feedback.
-
My personal wish is that the formatter would respect line breaks I add (or allow me to change the line width). I work with several vertical splits. The line width that the formatter assumes is often too wide for my splits. As the formatter joins lines I often see these lines wrapping, making the formatted code confusing. For example, the way I would like to format:
After the formatter joins this, I end up visually with this:
Places where I often see this issue:
|
Beta Was this translation helpful? Give feedback.
-
The formatter will add an empty line at the top of a document that contains only simple For example, this
formats to
|
Beta Was this translation helpful? Give feedback.
-
Some preferences:
|
Beta Was this translation helpful? Give feedback.
-
https://discord.com/channels/768594524158427167/768594524158427170/972580646771904632
Beta Was this translation helpful? Give feedback.
All reactions