WarWithinMe / better-align

A vscode extension to provide better vertical alignment
Other
75 stars 39 forks source link

Conditional `:` #80

Open saleynik opened 2 years ago

saleynik commented 2 years ago

In Elixir the positioning of : has a meaning. If the : is on the left side of a word, that's an atom, and such values shouldn't be broken apart, so:

type: :a | :b,
id: atom(),
other: :c | :def,
value: Quantity.t(),

needs to be aligned like this (preserving the atoms:

type:   :a | :b,
id:     atom(),
other:  :c | :def,
value:  Quantity.t(),

instead of:

type:   :             a | : b,
id:     atom(),
other:  :             c | : def,
value:  Quantity.t(),