SciML Style

`SciMLStyle()` !== 'SciML style' === Runic

Note that the SciML Style Guide currently suggests using Runic.jl for formatting instead.

JuliaFormatter's SciMLStyle() represents a collection of styles that predated this recommendation, and is being kept in v2 for compatibility. In a future major release this style may be renamed to avoid confusion.

JuliaFormatter.SciMLStyleType
SciMLStyle()

Formatting style based on SciMLStyle.

Configurable options with different defaults to DefaultStyle are:

  • always_for_in = true
  • disallow_single_arg_nesting = true
  • join_lines_based_on_source = true
  • normalize_line_endings = unix
  • remove_extra_newlines = true
  • sciml_margin_overrun = 20
  • short_to_long_function_def = true
  • trailing_comma = false
  • whitespace_ops_in_indices = true
  • whitespace_typedefs = true
  • yas_style_nesting = false
source

Configuration File Example

The .JuliaFormatter.toml which represents these settings is

style = "sciml"

Or to use SciMLStyle except change one of the settings:

style = "sciml"
remove_extra_newlines = false

Direct Usage

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

Or to use SciMLStyle except change one of the settings:

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

Additional Options

The SciMLStyle supports the following additional options, which have no effect on other styles: