Replies: 2 comments
-
|
Seems like a good idea to have. I haven't used JuliaFormatter before, but i heard that there is a bug in the latest version (the Readme recommends using v1). There is also Runic.jl |
Beta Was this translation helpful? Give feedback.
-
|
I’d also recommend using JuliaFormatter v1. It comes bundled with the Julia extension in VS Code, so you don’t need to install it separately. Once you enable “format on save” in VS Code, it will be picked up automatically. Also, the latest Julia extension ships with JuliaFormatter v1.0.62 by default, so there’s nothing to worry about on the version side either. As for Runic.jl, it doesn’t allow any customization of formatting rules. It always formats code in its own fixed style, which can be frustrating in practice. JuliaFormatter lets you customize the style via a For example, here is part of my own margin = 300
remove_extra_newlines = true
trailing_zero = false
trailing_comma = "nothing"
join_lines_based_on_source = true
whitespace_in_kwargs = false
annotate_untyped_fields_with_any = false
align_assignment = true
align_struct_field = true
align_conditional = true
align_pair_arrow = true
align_matrix = true |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi maintainers,
When contributing to Clapeyron.jl, I’ve found it a bit hard to keep consistent formatting across files because the repo doesn’t currently ship a unified formatting configuration (e.g., a .JuliaFormatter.toml). As a result, contributors either avoid auto-formatting entirely or risk reformatting unrelated parts of the code.
Would you be open to adding a repo-wide .JuliaFormatter.toml (at the repo root) so contributors can run a consistent formatter without style drift?
Thanks for you time!
Beta Was this translation helpful? Give feedback.
All reactions