-
Notifications
You must be signed in to change notification settings - Fork 749
Folding Ranges implementation #1326
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
Merged
jakebailey
merged 31 commits into
microsoft:main
from
navya9singh:outlineViewImplementation
Dec 2, 2025
+2,449
−7
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
f1616c3
porting folding
navya9singh c32bbb7
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh c691b7d
adding all tests
navya9singh 02723d4
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 1938da6
code clean up
navya9singh 86df138
cleanup
navya9singh 37babb6
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 18a2737
adding check for binary expression
navya9singh b7b020f
addressing pr comments
navya9singh dd3f93d
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 7435726
fixing test
navya9singh 3527adb
using sourceFile.endOfFileToken
navya9singh 3a1f476
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 08fbeda
addressing pr comments
navya9singh 30f9df7
addressing comments
navya9singh f68abaa
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 60e21ce
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 356383f
addressing comments
navya9singh 65e981f
adding defined capacity
navya9singh 35ea0dc
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh c849009
addressing comments
navya9singh 276316b
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 404e94f
updating the pr
navya9singh 633bc8b
adding fourslash tests
navya9singh 4737bbd
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 927e872
addressing pr comments
navya9singh 2ba4dcf
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 21cc988
fixing comparison function
navya9singh 2592640
Merge branch 'main' of https://github.com/navya9singh/typescript-go-r…
navya9singh 07d51aa
Porting differences copilot noticed
jakebailey 6a54dbc
Remove spanForNodeWithHintSpan accidental addition
jakebailey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
23 changes: 23 additions & 0 deletions
23
internal/fourslash/tests/gen/correuptedTryExpressionsDontCrashGettingOutlineSpans_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package fourslash_test | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/microsoft/typescript-go/internal/fourslash" | ||
| "github.com/microsoft/typescript-go/internal/testutil" | ||
| ) | ||
|
|
||
| func TestCorreuptedTryExpressionsDontCrashGettingOutlineSpans(t *testing.T) { | ||
gabritto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| t.Parallel() | ||
|
|
||
| defer testutil.RecoverAndFail(t, "Panic on fourslash test") | ||
| const content = `try[| { | ||
| var x = [ | ||
| {% try[||] %}|][|{% except %}|] | ||
| ] | ||
| } catch (e)[| { | ||
| }|]` | ||
| f := fourslash.NewFourslash(t, nil /*capabilities*/, content) | ||
| f.VerifyOutliningSpans(t) | ||
| } | ||
56 changes: 56 additions & 0 deletions
56
internal/fourslash/tests/gen/getOutliningForArrayDestructuring_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package fourslash_test | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/microsoft/typescript-go/internal/fourslash" | ||
| "github.com/microsoft/typescript-go/internal/testutil" | ||
| ) | ||
|
|
||
| func TestGetOutliningForArrayDestructuring(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| defer testutil.RecoverAndFail(t, "Panic on fourslash test") | ||
| const content = `const[| [ | ||
| a, | ||
| b, | ||
| c | ||
| ]|] =[| [ | ||
| 1, | ||
| 2, | ||
| 3 | ||
| ]|]; | ||
| const[| [ | ||
| [|[ | ||
| [|[ | ||
| [|[ | ||
| a, | ||
| b, | ||
| c | ||
| ]|] | ||
| ]|] | ||
| ]|], | ||
| [|[ | ||
| a1, | ||
| b1, | ||
| c1 | ||
| ]|] | ||
| ]|] =[| [ | ||
| [|[ | ||
| [|[ | ||
| [|[ | ||
| 1, | ||
| 2, | ||
| 3 | ||
| ]|] | ||
| ]|] | ||
| ]|], | ||
| [|[ | ||
| 1, | ||
| 2, | ||
| 3 | ||
| ]|] | ||
| ]|]` | ||
| f := fourslash.NewFourslash(t, nil /*capabilities*/, content) | ||
| f.VerifyOutliningSpans(t) | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.