SciML Style
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.SciMLStyle — Type
SciMLStyle()Formatting style based on SciMLStyle.
Configurable options with different defaults to DefaultStyle are:
always_for_in= truedisallow_single_arg_nesting= truejoin_lines_based_on_source= truenormalize_line_endings= unixremove_extra_newlines= truesciml_margin_overrun= 20short_to_long_function_def= truetrailing_comma= falsewhitespace_ops_in_indices= truewhitespace_typedefs= trueyas_style_nesting= false
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 = falseDirect 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: