-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Less aggresive completion list #1767
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
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
308f13f
infrastructure for builder item in completion list
85c5b3d
This fixes #1505 by not showing completionlist when defining a property.
54bf7ad
Add test case for completionlist when adding properties to a class.
1d2554b
Fix to make the completionlist work correctly when typing a new gener…
8c26917
Fourslash support for the builder property on completion lists.
8bcf376
Clean up
34cc5cc
First try at getting logic in for showing the builder.
189c8f8
Support for builder in modules + tests
c0a5dea
Delete old modules completion list test.
4892381
Merge branch 'master' into LessAggresiveCompletionList
832af68
Builder in constructor aruguments + tests.
cb4a110
test cases for builder in constructor
e4a24e9
Builder implementation for properties and parameters inlcuding tests.
7bc8f1e
Merge branch 'master' into LessAggresiveCompletionList
54c9e56
White space fixes
3bb817f
Clean up after code review, white space etc.
a9245d7
Merge branch 'master' into LessAggresiveCompletionList
5166d09
Merge branch 'master' into LessAggresiveCompletionList
3b0f8f6
Added comments and some additional cases
f8adf4e
Merge branch 'master' into LessAggresiveCompletionList
62bc9df
Support for destructuring + test case.
93f3321
Update API sample tests.
d9f678f
Rename the isBuilder property to something more meaningful.
e233da0
Parameter destructuring + tests
6e35f79
Add builder support for variable declarations + test cases.
ece874f
Merge branch 'master' into LessAggresiveCompletionList
40824ed
Added templates, assignement and arrays + tests.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
18 changes: 18 additions & 0 deletions
18
tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_Generics.ts
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,18 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
////interface A</*genericName1*/ | ||
|
||
////class A</*genericName2*/ | ||
|
||
////class B<T, /*genericName3*/ | ||
|
||
////class A{ | ||
//// f</*genericName4*/ | ||
|
||
////function A</*genericName5*/ | ||
|
||
|
||
test.markers().forEach((m) => { | ||
goTo.position(m.position, m.fileName); | ||
verify.completionListIsEmpty(); | ||
}); |
22 changes: 22 additions & 0 deletions
22
tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_destructuring.ts
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,22 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// var [x/*variable1*/ | ||
|
||
//// var [x, y/*variable2*/ | ||
|
||
//// var [./*variable3*/ | ||
|
||
//// var [x, ...z/*variable4*/ | ||
|
||
//// var {x/*variable5*/ | ||
|
||
//// var {x, y/*variable6*/ | ||
|
||
//// function func1({ a/*parameter1*/ | ||
|
||
//// function func2({ a, b/*parameter2*/ | ||
|
||
test.markers().forEach((m) => { | ||
goTo.position(m.position, m.fileName); | ||
verify.completionListIsEmpty(); | ||
}); |
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
37 changes: 37 additions & 0 deletions
37
tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_properties.ts
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,37 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
////var aa = 1; | ||
|
||
////class A1 { | ||
//// /*property1*/ | ||
////} | ||
|
||
////class A2 { | ||
//// p/*property2*/ | ||
////} | ||
|
||
////class A3 { | ||
//// public s/*property3*/ | ||
////} | ||
|
||
////class A4 { | ||
//// a/*property4*/ | ||
////} | ||
|
||
////class A5 { | ||
//// public a/*property5*/ | ||
////} | ||
|
||
////class A6 { | ||
//// protected a/*property6*/ | ||
////} | ||
|
||
////class A7 { | ||
//// private a/*property7*/ | ||
////} | ||
|
||
test.markers().forEach((m) => { | ||
goTo.position(m.position, m.fileName); | ||
verify.not.completionListIsEmpty(); | ||
verify.completionListAllowsNewIdentifier(); | ||
}); |
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
13 changes: 13 additions & 0 deletions
13
tests/cases/fourslash/completionListBuilderLocations_Modules.ts
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,13 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
////module A/*moduleName1*/ | ||
|
||
|
||
////module A./*moduleName2*/ | ||
|
||
|
||
test.markers().forEach((m) => { | ||
goTo.position(m.position, m.fileName); | ||
verify.not.completionListIsEmpty(); | ||
verify.completionListAllowsNewIdentifier(); | ||
}); |
34 changes: 34 additions & 0 deletions
34
tests/cases/fourslash/completionListBuilderLocations_VariableDeclarations.ts
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,34 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
////var x = a/*var1*/ | ||
|
||
////var x = (b/*var2*/ | ||
|
||
////var x = (c, d/*var3*/ | ||
|
||
//// var y : any = "", x = a/*var4*/ | ||
|
||
//// var y : any = "", x = (a/*var5*/ | ||
|
||
////class C{} | ||
////var y = new C( | ||
|
||
//// class C{} | ||
//// var y = new C(0, /*var7*/ | ||
|
||
////var y = [/*var8*/ | ||
|
||
////var y = [0, /*var9*/ | ||
|
||
////var y = `${/*var10*/ | ||
|
||
////var y = `${10} dd ${ /*var11*/ | ||
|
||
////var y = 10; y=/*var12*/ | ||
|
||
test.markers().forEach((m) => { | ||
goTo.position(m.position, m.fileName); | ||
verify.completionListAllowsNewIdentifier(); | ||
}); | ||
|
||
|
22 changes: 22 additions & 0 deletions
22
tests/cases/fourslash/completionListBuilderLocations_parameters.ts
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,22 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
////var aa = 1; | ||
|
||
////class bar1{ constructor(/*constructorParamter1*/ | ||
|
||
////class bar2{ constructor(a/*constructorParamter2*/ | ||
|
||
////class bar3{ constructor(a, /*constructorParamter3*/ | ||
|
||
////class bar4{ constructor(a, b/*constructorParamter4*/ | ||
|
||
////class bar6{ constructor(public a, /*constructorParamter5*/ | ||
|
||
////class bar7{ constructor(private a, /*constructorParamter6*/ | ||
|
||
|
||
test.markers().forEach((m) => { | ||
goTo.position(m.position, m.fileName); | ||
verify.not.completionListIsEmpty(); | ||
verify.completionListAllowsNewIdentifier(); | ||
}); |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't put newlines in here unless they also have //// preceding them, otherwise fourslash considers each thing a new file (all within the same project context). It's usually an unobservable difference but it's best to just be safe. Same thing in other tests by the looks of it, I won't comment on each one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intended these to be new files.