[CodeCompletion] Introduce "Flair" in code completion

To describe fine grained priorities.

Introduce 'CodeCompletionFlair' that is a set of more descriptive flags for
prioritizing completion items. This aims to replace '
SemanticContextKind::ExpressionSpecific' which was a "catch all"
prioritization flag.
This commit is contained in:
Rintaro Ishizaki
2021-05-20 17:14:49 -07:00
parent 509c498a21
commit 6dd5d9482f
36 changed files with 381 additions and 307 deletions

View File

@@ -27,7 +27,7 @@ func testConstructor() {
// CONSTRUCTOR: Begin completions
// CONSTRUCTOR-NOT: Pattern/{{.*}}
// CONSTRUCTOR-NOT: Decl[Constructor]
// CONSTRUCTOR: Pattern/ExprSpecific: {#a: Int#}[#Int#]
// CONSTRUCTOR: Pattern/Local/Flair[ExprSpecific]: {#a: Int#}[#Int#]
// CONSTRUCTOR-NOT: Pattern/{{.*}}
// CONSTRUCTOR-NOT: Decl[Constructor]
// CONSTRUCTOR: End completions
@@ -38,7 +38,7 @@ func testArg2Name3() {
firstArg(#^LABELED_FIRSTARG^#,
// LABELED_FIRSTARG: Begin completions
// LABELED_FIRSTARG-NOT: ['(']{#arg1: Int#}, {#arg2: Int#}[')'][#Void#];
// LABELED_FIRSTARG-DAG: Pattern/ExprSpecific: {#arg1: Int#}[#Int#];
// LABELED_FIRSTARG-DAG: Pattern/Local/Flair[ExprSpecific]: {#arg1: Int#}[#Int#];
// LABELED_FIRSTARG-NOT: ['(']{#arg1: Int#}, {#arg2: Int#}[')'][#Void#];
// LABELED_FIRSTARG: End completions