How to add tab to module with JuliaFormatter

Hi all,

I would like to modify the default behavior of JuliaFormatter so that it produces

module MyModule
   using ... 
   ...
end

instead of left alignment:

module MyModule
using ... 
...
end

Thanks!

For submodules there’s indent_submodule = true, but for “top” modules the manual suggests:

The recommended style is not to indent the body of the module, since that would typically lead to whole files being indented.

Most people typically add a comment to the module’s closing end to avoid confusion:

module MyModule
...
end # module
3 Likes