-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1767 from Microsoft/LessAggresiveCompletionList
This adds a builder property to the completion list; this allows us to show the completion list in more places and keep support for alternative completion keys, like space and dot. Note this required changes on the visual studio side too, so the complete experience won't be available until those are released. This fixes #1629, #1505, #1428 and negates #315.
- Loading branch information
Showing
20 changed files
with
331 additions
and
66 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
18 changes: 18 additions & 0 deletions
18
tests/cases/fourslash/completionListAtIdentifierDefinitionLocations_Generics.ts
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,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 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 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 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 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 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 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 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 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