Skip to content

Commit

Permalink
Merge branch 'feature/scala3' into pr/ci-spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Jan 6, 2025
2 parents 5361121 + 80feed5 commit 525b2b7
Show file tree
Hide file tree
Showing 5 changed files with 1,293 additions and 195 deletions.
17 changes: 0 additions & 17 deletions Scala/Dedentation Rules - case.tmPreferences

This file was deleted.

29 changes: 17 additions & 12 deletions Scala/Indentation Rules.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,28 @@
<string>(?x)
^ .* \{ [^}"']* $ # curly brace indent
| ^ .* \( [^)"']* $ # paren indent
# if a line ends with `=`, then it's a line-wrapped declaration (e.g. val x = \n)
| ^ .* = \s* $
# if a line ends with `:`, then it's a line-wrapped declaration (e.g. class Foo: \n)
| ^ .* : \s* $
# attempts to detect a line-wrapped control construct without curly braces (e.g. if (foo) \n)
| ^ .* \b(if|do|while|for|match|catch|try|else|yield)\b .* \) \s* $
# any line that starts with extension is an extension now
| ^ \s* extension\b .* $
# case statements have always been braceless, now they can just happen anywhere
| ^ \s* \b(case)\b .* =&gt; .* $
</string>
<key>decreaseIndentPattern</key>
<string>(?x)
^ (.*\*/)? \s* \} .* $ # curly brace dedent
| ^ (.*\*/)? \s* \) .* $ # parent dedent
</string>
<key>bracketIndentNextLinePattern</key>
<string>(?x)
# if a line ends with `=`, then it's a line-wrapped declaration (e.g. val x = \n)
^ .* = \s* $
# attempts to detect a line-wrapped control construct without curly braces (e.g. if (foo) \n)
| ^ .* \b(if|do|while|for)\b .* \) \s* $
# simpler line-wrapped control constructs
| ^ .* \b(else)\b \s* $
| ^ .* \b(yield)\b \s* $
| ^ \s* end ($|\s+ .* $) # end token
| ^ \s* (catch|else|yield) ($|\s+ .* $) # braceless things (I would prefer to also do while/do but we can't)
</string>
</dict>
</dict>
Expand Down
Loading

0 comments on commit 525b2b7

Please sign in to comment.