Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scala] Add support for Scala 3 #4124

Merged
merged 31 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9ce97e3
[Scala] Added support for new control syntax
djspiewak Dec 29, 2024
c4b1574
[Scala] Implemented support for braceless block syntax (suffix colon)
djspiewak Dec 29, 2024
b38ece5
[Scala] Added support for `end`
djspiewak Dec 30, 2024
54d4d11
[Scala] Added tests for new wildcards
djspiewak Dec 30, 2024
7057385
[Scala] Added support for `given`
djspiewak Dec 30, 2024
fdf4e8a
[Scala] Added support for extensions
djspiewak Dec 30, 2024
6b34a21
[Scala] Added support for enums
djspiewak Dec 30, 2024
67080b0
[Scala] Added support for type lambdas and cleaned up broken things
djspiewak Dec 30, 2024
893ba90
[Scala] Added support for context function types and fixed scoping
djspiewak Dec 30, 2024
4580c2c
[Scala] Implemented support for opaque types and intersect/unions
djspiewak Dec 30, 2024
cf57ad5
[Scala] Added support for dependent function types
djspiewak Dec 30, 2024
921ba9d
[Scala] Fixed missing punctuation scope for lambda parameters
djspiewak Dec 30, 2024
e224dee
[Scala] Added support for type lambdas and cleaned up dependent types
djspiewak Dec 30, 2024
aef5cd3
[Scala] Added support for match types (grumble grumble)
djspiewak Dec 30, 2024
ef50004
[Scala] Added tests for trait parameters
djspiewak Dec 30, 2024
8779b39
[Scala] Added support for `transparent` and `inline`
djspiewak Dec 30, 2024
c249584
[Scala] Added support for `export` and `as` renames
djspiewak Dec 30, 2024
fe5a915
[Scala] Better handling of soft modifiers
djspiewak Dec 30, 2024
fb34a44
[Scala] Still-better soft modifier handling
djspiewak Dec 30, 2024
720b2eb
[Scala] Added support for literal types
djspiewak Dec 30, 2024
cd30d5c
[Scala] Updated indentation rules to deal with braceless things as be…
djspiewak Dec 30, 2024
a3f18c9
[Scala] Added test for #3778
djspiewak Dec 31, 2024
3097120
[Scala] Inverted the order of comment newline eating
djspiewak Dec 31, 2024
4ed4ded
[Scala] Added support for `enum`
djspiewak Jan 3, 2025
7dd124b
[Scala] Made the typing experience slightly more pleasant for bracele…
djspiewak Jan 3, 2025
1687e44
[Scala] Fixed self types for newly restrictive lambda syntax
djspiewak Jan 3, 2025
677ce0d
Update Scala/Scala.sublime-syntax
djspiewak Jan 5, 2025
f8573cc
Update Scala/Scala.sublime-syntax
djspiewak Jan 5, 2025
e22aa77
Update Scala/Scala.sublime-syntax
djspiewak Jan 5, 2025
1a6f466
Update Scala/Scala.sublime-syntax
djspiewak Jan 5, 2025
80feed5
Update Scala/Scala.sublime-syntax
djspiewak Jan 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading