Repository navigation
Conversation
hakkelt
commented
Nov 30, 2026
- Add mentions to styles supported by JuliaFormatter.jl, and example to customize a predefined style
- Add example for CLI use of JuliaFormatter.jl
- Add Runic.jl subsection
- Add mentions to styles supported by JuliaFormatter.jl, and example to customize a predefined style - Add example for CLI use of JuliaFormatter.jl - Add Runic.jl subsection
adrhill
requested changes
Nov 30, 2026
|
|
||
| To make your code easy to read, it is essential to follow a consistent set of guidelines. | ||
| The official [style guide](https://docs.julialang.org/en/v1/manual/style-guide/) is very short, so most people use third party style guides like [BlueStyle](https://github.com/JuliaDiff/BlueStyle) or [SciMLStyle](https://github.com/SciML/SciMLStyle). | ||
| The official [style guide](https://docs.julialang.org/en/v1/manual/style-guide/) is very short, so most people use third party style guides like [BlueStyle](https://github.com/JuliaDiff/BlueStyle), [SciMLStyle](https://github.com/SciML/SciMLStyle), or [YASGuide](https://github.com/jrevels/YASGuide). |
Collaborator
There was a problem hiding this comment.
I don't think "YASGuide" is as popular as Blue/SciML/Runic, is there a particular reason you want to add it?
Comment on lines
+175
to
+183
| To override the defaults of the chosen style, you can add additional lines: | ||
|
|
||
| ```toml | ||
| style = "blue" | ||
| indent = 2 | ||
| margin = 100 | ||
| remove_extra_newlines = false | ||
| ``` | ||
|
|
Collaborator
There was a problem hiding this comment.
We could keep MoJuWo a bit more concise by linking to the JuliaFormatter options instead: https://juliaeditorsupport.github.io/JuliaFormatter.jl/stable/formatting_options/#formatting-options
This also helps avoid drift.
Comment on lines
+191
to
+198
| Or you can install it as a command-line application: | ||
| ```bash | ||
| # Install it once with: | ||
| julia -e 'using Pkg; Pkg.Apps.add("JuliaFormatter")' | ||
|
|
||
| # Then you can use it to format all files in a directory with multiple threads: | ||
| jlfmt --threads=6 -- --inplace -v src/ | ||
| ``` |
Collaborator
There was a problem hiding this comment.
I think this section is a great addition.
I'd suggest we keep it vanilla and drop the --threads argument though, leaving such defaults to JuliaFormatter.
Collaborator
There was a problem hiding this comment.
I'm also wondering what the extra -- does?
|
|
||
| Another approach, taken by [Runic.jl](https://github.com/fredrikekre/Runic.jl), is not to allow any customization, and format the code with a fixed set of rules (_"A code formatter with rules set in stone."_). It is known for its ease of use and very fast execution. | ||
|
|
||
| Run the following to install and run as a command-line application: |
Collaborator
There was a problem hiding this comment.
Suggested change
| Run the following to install and run as a command-line application: | |
| Run the following to install Runic and run it as a command-line application: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.