Blue Style

JuliaFormatter.BlueStyleType
BlueStyle()

Formatting style based on BlueStyle and JuliaFormatter#283.

Note

This style is still work-in-progress, and does not yet implement all of the BlueStyle guide.

Configurable options with different defaults to DefaultStyle are:

  • always_use_return = true
  • short_to_long_function_def = true
  • whitespace_ops_in_indices = true
  • remove_extra_newlines = true
  • always_for_in = true
  • import_to_using = true
  • pipe_to_function_call = true
  • whitespace_in_kwargs = false
  • annotate_untyped_fields_with_any = false
  • separate_kwargs_with_semicolon = true
source

Configuration File Example

The .JuliaFormatter.toml which represents these settings is

style = "blue"

Or to use BlueStyle except change one of the settings:

style = "blue"
remove_extra_newlines = false

Direct Usage

format("file.jl", BlueStyle())

Or to use BlueStyle except change one of the settings:

format("file.jl", BlueStyle(), remove_extra_newlines=false)