File Options

These options can be specified either in a .JuliaFormatter.toml configuration file, or as extra arguments to the jlfmt command-line tool.

On top of these, you can also add all formatting options to the configuration file or CLI arguments.

style

To choose another base style, such as YASStyle you can write this in your configuration like so:

style = "yas"

Style choices are:

  • "default" (default choice if nothing is specified)
  • "yas"
  • "blue"
  • "sciml"
  • "minimal"

overwrite

Default: true

If true the file will be reformatted in-place, overwriting the existing file; if it is false, the formatted version will not be written anywhere.

verbose

Default: false

If true, extra details about the formatting process are printed to stdout.

format_markdown

Default: false

If true, Markdown files are also formatted. Julia code blocks will be formatted, in addition to the Markdown being normalized.

ignore

An array of paths to files and directories (with possible glob wildcards, as implemented by [Glob.jl])(https://github.com/vtjnash/Glob.jl)) which will not be formatted.

For example, if .JuliaFormatter.toml contains

ignore = ["file.jl", "directory", "file_*.jl"]

then JuliaFormatter will skip over all of these files:

  • file.jl
  • directory/something.jl
  • other_directory/file.jl
  • file_1.jl
  • other_directory/file_name.jl
Path separators

Glob.jl uses / as its path separator (\ is an escape sequence), so even if you are on Windows, you should specify your ignore patterns with /.