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_for_in = true
  • always_use_return = true
  • annotate_untyped_fields_with_any = false
  • conditional_to_if = true
  • import_to_using = true
  • indent_submodule = true
  • pipe_to_function_call = true
  • remove_extra_newlines = true
  • separate_kwargs_with_semicolon = true
  • short_to_long_function_def = true
  • whitespace_in_kwargs = false
  • whitespace_ops_in_indices = true
  • yas_style_nesting = false
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)