The heavy use operators in elixir combined with the fact that functions can have special characters such as .empty? or special meaning such as ^pinned means that using different colors for operators and functions improves readability a bit.
Improved consistency of char-list highlighting (green)
'char-list' has an issue where the single quotes were highlighted green, while the body was blue. This is fixed by making the whole body green.
Improved consistency of module highlighting (orange)
Module names don't always have the same color depending on the context. Module Definitions are orange while import and usage are yellow. This is fixed by making all instances of modules orange.
Changed color of importing functions to match module attributes (red)
Importing functions such as [use, require, import, alias] are most often placed alongside module attributes at the start of modules/functions. They both serve in a general sense as elixir's tools setup for module/function (constants, docs, imports, alias, and so on) so might as well have consistent coloring.
Improved consistency of non-atom constant highlighting (yellow)
Added distinct regex highlighting (dark red)
Having regex the same color as strings makes reading string manipulation pipelines far too difficult
red : Importing functions and module attributes (header sutff)
dark red : Regex
See example below.
Alternate Designs
The colors for each group could different. The current color scheme was chosen to minimize the change from Elixir's current highlighting.
Possible Drawbacks
Changing the color scheme will affect people already using One-Dark with Elixir. While the improvements to highlighting consistency will be welcome, there is no guaranty everyone will agree on the color choices.
Applicable Issues
Lambda shorthand &{ &1 } and string interpolation #{ var } highlights as red. While this is exactly the same as it was before, it isn't consistent with red being all "header stuff". Sadly there in no way around this with how atom's elixir language grammars currently work.
Description of the Change
Improved Elixir syntax highlighting
.empty?
or special meaning such as^pinned
means that using different colors for operators and functions improves readability a bit.'char-list'
has an issue where the single quotes were highlighted green, while the body was blue. This is fixed by making the whole body green.[use, require, import, alias]
are most often placed alongside module attributes at the start of modules/functions. They both serve in a general sense as elixir's tools setup for module/function (constants, docs, imports, alias, and so on) so might as well have consistent coloring.Outcome
See example below.
Alternate Designs
The colors for each group could different. The current color scheme was chosen to minimize the change from Elixir's current highlighting.
Possible Drawbacks
Changing the color scheme will affect people already using One-Dark with Elixir. While the improvements to highlighting consistency will be welcome, there is no guaranty everyone will agree on the color choices.
Applicable Issues
Lambda shorthand
&{ &1 }
and string interpolation#{ var }
highlights as red. While this is exactly the same as it was before, it isn't consistent with red being all "header stuff". Sadly there in no way around this with how atom's elixir language grammars currently work.Example