-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement: thresholds for folding regions
- don't merge region with parent when if parent too small without it - allow to configure folding region threshold using server properties - make threshold work consistently
- Loading branch information
1 parent
41a2d57
commit 6e3f017
Showing
19 changed files
with
118 additions
and
53 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
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
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
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
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
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
28 changes: 28 additions & 0 deletions
28
tests/unit/src/test/resources/foldingRange-scala3-foldLineOnly/expect/i6938.scala
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
def xd =>>region>> | ||
val t = | ||
1 + 2 | ||
|
||
t match | ||
case 3 => println("ok") | ||
case _ => println("ko")<<region<< | ||
end xd | ||
|
||
|
||
def xd2 =>>region>> | ||
val t = 1 + 2 | ||
|
||
t match>>region>> | ||
case 3 => | ||
println("ok") | ||
case _ => println("ko")<<region<<<<region<< | ||
end xd2 | ||
|
||
def xd3 =>>region>> | ||
val t = | ||
1 + 2 | ||
|
||
t match>>region>> | ||
case 3 => | ||
println("ok") | ||
case _ => println("ko")<<region<<<<region<< | ||
end xd3 |
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
28 changes: 28 additions & 0 deletions
28
tests/unit/src/test/resources/foldingRange-scala3-foldLineOnly/input/i6938.scala
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
def xd = | ||
val t = | ||
1 + 2 | ||
|
||
t match | ||
case 3 => println("ok") | ||
case _ => println("ko") | ||
end xd | ||
|
||
|
||
def xd2 = | ||
val t = 1 + 2 | ||
|
||
t match | ||
case 3 => | ||
println("ok") | ||
case _ => println("ko") | ||
end xd2 | ||
|
||
def xd3 = | ||
val t = | ||
1 + 2 | ||
|
||
t match | ||
case 3 => | ||
println("ok") | ||
case _ => println("ko") | ||
end xd3 |
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
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
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
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
4 changes: 2 additions & 2 deletions
4
tests/unit/src/test/resources/foldingRange/expect/Literals.scala
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,13 +1,13 @@ | ||
class A>>region>>{ | ||
val multilineString =>>region>> | ||
""" | ||
""">>region>> | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
""".stripMargin<<region<< | ||
"""<<region<<.stripMargin<<region<< | ||
|
||
val b = ??? | ||
}<<region<< |
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
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
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.