-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a huge patch and adds formatting of indentation. It is slightly difficult to come up with a good set of rules but I think what is here is pretty nice. There are two types of indentation: block/hard indentation and continuation/soft indentation. Block indentation are context independent and are thus "hard" or required in the sense that they always happen. Block indentation are enabled for all `x - end` blocks where `x` is one of `begin`, `do`, `for`, `function`, `if`, `let`, `quote`, `struct`, `try`, `while`. A notable exception is `module`, but one idea is to indent nested modules (in the same file). Continuation or soft indents are context dependent in the sense that if nested within another soft indent they extra indents are skipped. Soft indentation applies to all expressions spanning multiple lines. For example, newlines in operator chains: ```julia a + b * c + d # soft indent ``` function calls ```julia foo( a, b c, d # soft indent ) ``` etc.
- Loading branch information
1 parent
cf56644
commit 9a7e2e2
Showing
6 changed files
with
1,070 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/Manifest.toml | ||
*.cov |
This file contains 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
Oops, something went wrong.