Skip to content

Commit 5c01ca1

Browse files
authored
Merge pull request #74526 from hamishknight/keyword-completion-6.0
[6.0] [Completion] Completions for `inout`, `borrowing`, `consuming`, `isolated`, `consume`, and `copy`
2 parents 1bcf094 + 7faf312 commit 5c01ca1

11 files changed

+118
-14
lines changed

include/swift/AST/DeclAttr.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,10 @@ CONTEXTUAL_SIMPLE_DECL_ATTR(_local, KnownToBeLocal,
453453
DeclModifier | OnFunc | OnParam | OnVar | UserInaccessible | ABIBreakingToAdd | ABIBreakingToRemove | APIBreakingToAdd | APIBreakingToRemove,
454454
130)
455455
CONTEXTUAL_SIMPLE_DECL_ATTR(consuming, Consuming,
456-
OnFunc | OnAccessor | DeclModifier | UserInaccessible | NotSerialized | ABIBreakingToAdd | ABIBreakingToRemove | APIStableToAdd | APIStableToRemove,
456+
OnFunc | OnAccessor | DeclModifier | NotSerialized | ABIBreakingToAdd | ABIBreakingToRemove | APIStableToAdd | APIStableToRemove,
457457
140)
458458
CONTEXTUAL_SIMPLE_DECL_ATTR(borrowing, Borrowing,
459-
OnFunc | OnAccessor | DeclModifier | UserInaccessible | NotSerialized | ABIBreakingToAdd | ABIBreakingToRemove | APIStableToAdd | APIStableToRemove,
459+
OnFunc | OnAccessor | DeclModifier | NotSerialized | ABIBreakingToAdd | ABIBreakingToRemove | APIStableToAdd | APIStableToRemove,
460460
141)
461461
DECL_ATTR(attached, MacroRole,
462462
OnMacro | AllowMultipleAttributes | ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIBreakingToRemove,

include/swift/AST/TokenKinds.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ DECL_KEYWORD(extension)
145145
DECL_KEYWORD(func)
146146
DECL_KEYWORD(import)
147147
DECL_KEYWORD(init)
148-
DECL_KEYWORD(inout)
149148
DECL_KEYWORD(let)
150149
DECL_KEYWORD(operator)
151150
DECL_KEYWORD(precedencegroup)
@@ -259,8 +258,9 @@ MISC(string_interpolation_anchor)
259258
MISC(kw_yield)
260259
MISC(kw_discard)
261260
MISC(kw_then)
261+
SWIFT_KEYWORD(inout)
262262

263-
// The following tokens are irrelevant for swiftSyntax and thus only declared
263+
// The following tokens are irrelevant for swiftSyntax and thus only declared
264264
// in this .def file
265265

266266
SIL_KEYWORD(undef)

include/swift/IDE/CodeCompletionResult.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ enum class CompletionKind : uint8_t {
197197
PostfixExpr,
198198
KeyPathExprObjC,
199199
KeyPathExprSwift,
200+
TypePossibleFunctionParamBeginning,
200201
TypeDeclResultBeginning,
201202
TypeBeginning,
202203
TypeSimpleOrComposition,

include/swift/Parse/IDEInspectionCallbacks.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ class CodeCompletionCallbacks {
178178
/// #keyPath argument have been parsed yet.
179179
virtual void completeExprKeyPath(KeyPathExpr *KPE, SourceLoc DotLoc) {};
180180

181+
/// Complete the beginning of the type for a parameter of a
182+
/// func/subscript/closure, or the type for a parameter in a function type.
183+
/// For the latter, we cannot know for sure whether the user is trying to
184+
/// write a function type, so will complete for e.g `let x: (#^COMPLETE^#`.
185+
virtual void completeTypePossibleFunctionParamBeginning() {}
186+
181187
/// Complete the beginning of the type of result of func/var/let/subscript.
182188
virtual void completeTypeDeclResultBeginning() {};
183189

lib/IDE/CodeCompletion.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks,
259259
void completePostfixExpr(CodeCompletionExpr *E, bool hasSpace) override;
260260
void completeExprKeyPath(KeyPathExpr *KPE, SourceLoc DotLoc) override;
261261

262+
void completeTypePossibleFunctionParamBeginning() override;
262263
void completeTypeDeclResultBeginning() override;
263264
void completeTypeBeginning() override;
264265
void completeTypeSimpleOrComposition() override;
@@ -430,6 +431,11 @@ void CodeCompletionCallbacksImpl::completePoundAvailablePlatform() {
430431
CurDeclContext = P.CurDeclContext;
431432
}
432433

434+
void CodeCompletionCallbacksImpl::completeTypePossibleFunctionParamBeginning() {
435+
Kind = CompletionKind::TypePossibleFunctionParamBeginning;
436+
CurDeclContext = P.CurDeclContext;
437+
}
438+
433439
void CodeCompletionCallbacksImpl::completeTypeDeclResultBeginning() {
434440
Kind = CompletionKind::TypeDeclResultBeginning;
435441
CurDeclContext = P.CurDeclContext;
@@ -899,6 +905,8 @@ void swift::ide::addExprKeywords(CodeCompletionResultSink &Sink,
899905
addKeyword(Sink, "try!", CodeCompletionKeywordKind::kw_try, "", flair);
900906
addKeyword(Sink, "try?", CodeCompletionKeywordKind::kw_try, "", flair);
901907
addKeyword(Sink, "await", CodeCompletionKeywordKind::None, "", flair);
908+
addKeyword(Sink, "consume", CodeCompletionKeywordKind::None, "", flair);
909+
addKeyword(Sink, "copy", CodeCompletionKeywordKind::None, "", flair);
902910
}
903911

904912
void swift::ide::addSuperKeyword(CodeCompletionResultSink &Sink,
@@ -1058,6 +1066,12 @@ void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,
10581066
}
10591067
break;
10601068

1069+
case CompletionKind::TypePossibleFunctionParamBeginning:
1070+
addKeyword(Sink, "inout", CodeCompletionKeywordKind::kw_inout);
1071+
addKeyword(Sink, "borrowing", CodeCompletionKeywordKind::None);
1072+
addKeyword(Sink, "consuming", CodeCompletionKeywordKind::None);
1073+
addKeyword(Sink, "isolated", CodeCompletionKeywordKind::None);
1074+
LLVM_FALLTHROUGH;
10611075
case CompletionKind::TypeBeginning:
10621076
addKeyword(Sink, "repeat", CodeCompletionKeywordKind::None);
10631077
LLVM_FALLTHROUGH;
@@ -1262,6 +1276,7 @@ void swift::ide::postProcessCompletionResults(
12621276
// names at non-type name position are "rare".
12631277
if (result->getKind() == CodeCompletionResultKind::Declaration &&
12641278
result->getAssociatedDeclKind() == CodeCompletionDeclKind::Protocol &&
1279+
Kind != CompletionKind::TypePossibleFunctionParamBeginning &&
12651280
Kind != CompletionKind::TypeBeginning &&
12661281
Kind != CompletionKind::TypeSimpleOrComposition &&
12671282
Kind != CompletionKind::TypeSimpleBeginning &&
@@ -1755,6 +1770,7 @@ void CodeCompletionCallbacksImpl::doneParsing(SourceFile *SrcFile) {
17551770
break;
17561771
}
17571772

1773+
case CompletionKind::TypePossibleFunctionParamBeginning:
17581774
case CompletionKind::TypeDeclResultBeginning:
17591775
case CompletionKind::TypeBeginning:
17601776
case CompletionKind::TypeSimpleOrComposition:

lib/Parse/ParsePattern.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,22 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
374374
.fixItReplace(Tok.getLoc(), "`" + Tok.getText().str() + "`");
375375
}
376376

377+
auto parseParamType = [&]() -> ParserResult<TypeRepr> {
378+
// Currently none of the parameter type completions are relevant for
379+
// enum cases, so don't include them. We'll complete for a regular type
380+
// beginning instead.
381+
if (Tok.is(tok::code_complete) &&
382+
paramContext != ParameterContextKind::EnumElement) {
383+
if (CodeCompletionCallbacks)
384+
CodeCompletionCallbacks->completeTypePossibleFunctionParamBeginning();
385+
386+
auto CCLoc = consumeToken(tok::code_complete);
387+
auto *ET = ErrorTypeRepr::create(Context, CCLoc);
388+
return makeParserCodeCompletionResult<TypeRepr>(ET);
389+
}
390+
return parseType(diag::expected_parameter_type);
391+
};
392+
377393
if (startsParameterName(isClosure)) {
378394
// identifier-or-none for the first name
379395
param.FirstNameLoc = consumeArgumentLabel(param.FirstName,
@@ -421,7 +437,7 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
421437
// (':' type)?
422438
if (consumeIf(tok::colon)) {
423439

424-
auto type = parseType(diag::expected_parameter_type);
440+
auto type = parseParamType();
425441
status |= type;
426442
param.Type = type.getPtrOrNull();
427443

@@ -444,7 +460,7 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
444460
}
445461

446462
if (isBareType && paramContext == ParameterContextKind::EnumElement) {
447-
auto type = parseType(diag::expected_parameter_type);
463+
auto type = parseParamType();
448464
status |= type;
449465
param.Type = type.getPtrOrNull();
450466
param.FirstName = Identifier();
@@ -459,7 +475,7 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
459475
// the user is about to type the parameter label and we shouldn't
460476
// suggest types.
461477
SourceLoc typeStartLoc = Tok.getLoc();
462-
auto type = parseType(diag::expected_parameter_type);
478+
auto type = parseParamType();
463479
status |= type;
464480
param.Type = type.getPtrOrNull();
465481

lib/Parse/ParseType.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,16 @@ ParserResult<TypeRepr> Parser::parseTypeTupleBody() {
12061206
}
12071207
Backtracking.reset();
12081208

1209+
// If we have a code completion token, treat this as a possible parameter
1210+
// type since the user may be writing this as a function type.
1211+
if (Tok.is(tok::code_complete)) {
1212+
if (CodeCompletionCallbacks)
1213+
CodeCompletionCallbacks->completeTypePossibleFunctionParamBeginning();
1214+
1215+
consumeToken();
1216+
return makeParserCodeCompletionStatus();
1217+
}
1218+
12091219
// Parse the type annotation.
12101220
auto type = parseType(diag::expected_type);
12111221
if (type.hasCodeCompletion())

test/IDE/complete_at_top_level_library.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ protocol MyProtocol {}
1919
// LIBRARY-DAG: Keyword[func]/None: func; name=func
2020
// LIBRARY-DAG: Keyword[import]/None: import; name=import
2121
// LIBRARY-DAG: Keyword[init]/None: init; name=init
22-
// LIBRARY-DAG: Keyword[inout]/None: inout; name=inout
2322
// LIBRARY-DAG: Keyword[operator]/None: operator; name=operator
2423
// LIBRARY-DAG: Keyword[precedencegroup]/None: precedencegroup; name=precedencegroup
2524
// LIBRARY-DAG: Keyword[protocol]/None/Flair[CommonKeyword]: protocol; name=protocol
@@ -86,7 +85,6 @@ protocol MyProtocol {}
8685
// SCRIPT-DAG: Keyword[func]/None: func; name=func
8786
// SCRIPT-DAG: Keyword[import]/None: import; name=import
8887
// SCRIPT-DAG: Keyword[init]/None: init; name=init
89-
// SCRIPT-DAG: Keyword[inout]/None: inout; name=inout
9088
// SCRIPT-DAG: Keyword[operator]/None: operator; name=operator
9189
// SCRIPT-DAG: Keyword[precedencegroup]/None: precedencegroup; name=precedencegroup
9290
// SCRIPT-DAG: Keyword[protocol]/None: protocol; name=protocol

test/IDE/complete_keywords.swift

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// KW_IN: Keyword[in]/None: in{{; name=.+$}}
77
// KW_NO_IN-NOT: Keyword[in]
88

9+
// KW_NO_INOUT-NOT: Keyword[inout]
10+
911
// KW_DECL-DAG: Keyword[class]/None: class{{; name=.+$}}
1012
// KW_DECL-DAG: Keyword/None: actor{{; name=.+$}}
1113
// KW_DECL-DAG: Keyword/None: convenience{{; name=.+$}}
@@ -23,6 +25,8 @@
2325
// KW_DECL-DAG: Keyword[let]/None: let{{; name=.+$}}
2426
// KW_DECL-DAG: Keyword/None: mutating{{; name=.+$}}
2527
// KW_DECL-DAG: Keyword/None: nonmutating{{; name=.+$}}
28+
// KW_DECL-DAG: Keyword/None: consuming{{; name=.+$}}
29+
// KW_DECL-DAG: Keyword/None: borrowing{{; name=.+$}}
2630
// KW_DECL-DAG: Keyword[operator]/None: operator{{; name=.+$}}
2731
// KW_DECL-DAG: Keyword/None: optional{{; name=.+$}}
2832
// KW_DECL-DAG: Keyword/None: override{{; name=.+$}}
@@ -58,6 +62,8 @@
5862
// KW_DECL_PROTOCOL-DAG: Keyword[let]/None: let{{; name=.+$}}
5963
// KW_DECL_PROTOCOL-DAG: Keyword/None: mutating{{; name=.+$}}
6064
// KW_DECL_PROTOCOL-DAG: Keyword/None: nonmutating{{; name=.+$}}
65+
// KW_DECL_PROTOCOL-DAG: Keyword/None: consuming{{; name=.+$}}
66+
// KW_DECL_PROTOCOL-DAG: Keyword/None: borrowing{{; name=.+$}}
6167
// KW_DECL_PROTOCOL-DAG: Keyword[operator]/None/Flair[RareKeyword]: operator{{; name=.+$}}
6268
// KW_DECL_PROTOCOL-DAG: Keyword/None: optional{{; name=.+$}}
6369
// KW_DECL_PROTOCOL-DAG: Keyword/None: override{{; name=.+$}}
@@ -93,6 +99,8 @@
9399
// KW_DECL_TYPECONTEXT-DAG: Keyword[let]/None: let{{; name=.+$}}
94100
// KW_DECL_TYPECONTEXT-DAG: Keyword/None: mutating{{; name=.+$}}
95101
// KW_DECL_TYPECONTEXT-DAG: Keyword/None: nonmutating{{; name=.+$}}
102+
// KW_DECL_TYPECONTEXT-DAG: Keyword/None: consuming{{; name=.+$}}
103+
// KW_DECL_TYPECONTEXT-DAG: Keyword/None: borrowing{{; name=.+$}}
96104
// KW_DECL_TYPECONTEXT-DAG: Keyword[operator]/None/Flair[RareKeyword]: operator{{; name=.+$}}
97105
// KW_DECL_TYPECONTEXT-DAG: Keyword/None: optional{{; name=.+$}}
98106
// KW_DECL_TYPECONTEXT-DAG: Keyword/None: override{{; name=.+$}}
@@ -132,6 +140,8 @@
132140
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword[let]/None: let{{; name=.+$}}
133141
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: mutating{{; name=.+$}}
134142
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: nonmutating{{; name=.+$}}
143+
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: consuming{{; name=.+$}}
144+
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: borrowing{{; name=.+$}}
135145
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword[operator]/None: operator{{; name=.+$}}
136146
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: optional{{; name=.+$}}
137147
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: override{{; name=.+$}}
@@ -172,6 +182,9 @@
172182
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword[try]/None: try{{; name=.+$}}
173183
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword[try]/None: try!{{; name=.+$}}
174184
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword[try]/None: try?{{; name=.+$}}
185+
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: await{{; name=.+$}}
186+
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: consume{{; name=.+$}}
187+
// KW_DECL_STMT_TOPLEVEL-DAG: Keyword/None: copy{{; name=.+$}}
175188
//
176189
// Literals
177190
//
@@ -198,6 +211,8 @@
198211
// KW_DECL_STMT-DAG: Keyword[let]/None: let{{; name=.+$}}
199212
// KW_DECL_STMT-DAG: Keyword/None: mutating{{; name=.+$}}
200213
// KW_DECL_STMT-DAG: Keyword/None: nonmutating{{; name=.+$}}
214+
// KW_DECL_STMT-DAG: Keyword/None: consuming{{; name=.+$}}
215+
// KW_DECL_STMT-DAG: Keyword/None: borrowing{{; name=.+$}}
201216
// KW_DECL_STMT-DAG: Keyword[operator]/None/Flair[RareKeyword]: operator{{; name=.+$}}
202217
// KW_DECL_STMT-DAG: Keyword/None/Flair[RareKeyword]: optional{{; name=.+$}}
203218
// KW_DECL_STMT-DAG: Keyword/None/Flair[RareKeyword]: override{{; name=.+$}}
@@ -238,6 +253,9 @@
238253
// KW_DECL_STMT-DAG: Keyword[try]/None: try{{; name=.+$}}
239254
// KW_DECL_STMT-DAG: Keyword[try]/None: try!{{; name=.+$}}
240255
// KW_DECL_STMT-DAG: Keyword[try]/None: try?{{; name=.+$}}
256+
// KW_DECL_STMT-DAG: Keyword/None: await{{; name=.+$}}
257+
// KW_DECL_STMT-DAG: Keyword/None: consume{{; name=.+$}}
258+
// KW_DECL_STMT-DAG: Keyword/None: copy{{; name=.+$}}
241259
//
242260
// Literals
243261
//
@@ -252,6 +270,9 @@
252270
// KW_EXPR-DAG: Keyword[try]/None: try{{; name=.+$}}
253271
// KW_EXPR-DAG: Keyword[try]/None: try!{{; name=.+$}}
254272
// KW_EXPR-DAG: Keyword[try]/None: try?{{; name=.+$}}
273+
// KW_EXPR-DAG: Keyword/None: await{{; name=.+$}}
274+
// KW_EXPR-DAG: Keyword/None: consume{{; name=.+$}}
275+
// KW_EXPR-DAG: Keyword/None: copy{{; name=.+$}}
255276
//
256277
// let and var
257278
//
@@ -283,7 +304,7 @@
283304
// KW_EXPR_NEG-NOT: Keyword{{.*}}catch
284305
// KW_EXPR_NEG-NOT: Keyword{{.*}}break
285306

286-
#^TOP_LEVEL_1?check=KW_DECL_STMT_TOPLEVEL;check=KW_NO_RETURN;check=KW_NO_IN^#
307+
#^TOP_LEVEL_1?check=KW_DECL_STMT_TOPLEVEL;check=KW_NO_RETURN;check=KW_NO_IN;check=KW_NO_INOUT^#
287308

288309
for _ in 1...10 {
289310
#^TOP_LEVEL_2?check=KW_DECL_STMT;check=KW_NO_RETURN;check=KW_NO_IN^#
@@ -357,19 +378,19 @@ struct InInit {
357378
}
358379

359380
struct InStruct {
360-
#^IN_NOMINAL_DECL_1?check=KW_DECL_TYPECONTEXT^#
381+
#^IN_NOMINAL_DECL_1?check=KW_DECL_TYPECONTEXT;check=KW_NO_INOUT^#
361382
}
362383

363384
enum InEnum {
364-
#^IN_NOMINAL_DECL_2?check=KW_DECL_TYPECONTEXT^#
385+
#^IN_NOMINAL_DECL_2?check=KW_DECL_TYPECONTEXT;check=KW_NO_INOUT^#
365386
}
366387

367388
class InClass {
368-
#^IN_NOMINAL_DECL_3?check=KW_DECL_TYPECONTEXT^#
389+
#^IN_NOMINAL_DECL_3?check=KW_DECL_TYPECONTEXT;check=KW_NO_INOUT^#
369390
}
370391

371392
protocol InProtocol {
372-
#^IN_NOMINAL_DECL_4?check=KW_DECL_PROTOCOL^#
393+
#^IN_NOMINAL_DECL_4?check=KW_DECL_PROTOCOL;check=KW_NO_INOUT^#
373394
}
374395

375396
struct AfterOtherKeywords1 {
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// RUN: %batch-code-completion
2+
3+
func foo(x: #^FUNC_PARAM?check=SPECIFIER^#) {
4+
let fn1 = { (x: #CLOSURE_PARAM?check=SPECIFIER#) in }
5+
let fn2: (#^CLOSURE_PARAM_TY_COMPLETE?check=SPECIFIER^#) -> Void
6+
let fn3: (#^CLOSURE_PARAM_TY_INCOMPLETE?check=SPECIFIER^#
7+
}
8+
9+
struct S {
10+
init(x: #^INIT_PARAM?check=SPECIFIER^#) {}
11+
subscript(x: #SUBSCRIPT_PARAM?check=SPECIFIER#) {}
12+
}
13+
14+
// Don't complete for enum cases.
15+
enum E {
16+
case e(#^ENUM_CASE_TY?check=SPECIFIER_NOT^#)
17+
case f(x: #^ENUM_CASE_LABELED_TY?check=SPECIFIER_NOT^#)
18+
}
19+
20+
// Don't complete for a regular variable type.
21+
let x: #^VAR_TY?check=SPECIFIER_NOT^#
22+
23+
// Or for a return type.
24+
func bar() -> #^RETURN_TY?check=SPECIFIER_NOT^# {}
25+
26+
// SPECIFIER-DAG: Keyword[inout]/None: inout; name=inout
27+
// SPECIFIER-DAG: Keyword/None: consuming; name=consuming
28+
// SPECIFIER-DAG: Keyword/None: borrowing; name=borrowing
29+
// SPECIFIER-DAG: Keyword/None: isolated; name=isolated
30+
31+
// SPECIFIER_NOT-NOT: Keyword[inout]/None: inout
32+
// SPECIFIER_NOT-NOT: Keyword/None: consuming
33+
// SPECIFIER_NOT-NOT: Keyword/None: borrowing
34+
// SPECIFIER_NOT-NOT: Keyword/None: isolated

tools/SourceKit/lib/SwiftLang/CodeCompletionOrganizer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ bool SourceKit::CodeCompletion::addCustomCompletions(
175175
addCompletion(custom);
176176
}
177177
break;
178+
case CompletionKind::TypePossibleFunctionParamBeginning:
178179
case CompletionKind::TypeDeclResultBeginning:
179180
case CompletionKind::TypeBeginning:
180181
case CompletionKind::TypeSimpleOrComposition:
@@ -452,6 +453,7 @@ void CodeCompletionOrganizer::Impl::addCompletionsWithFilter(
452453
if (filterText.empty()) {
453454
bool hideLowPriority =
454455
options.hideLowPriority &&
456+
completionKind != CompletionKind::TypePossibleFunctionParamBeginning &&
455457
completionKind != CompletionKind::TypeDeclResultBeginning &&
456458
completionKind != CompletionKind::TypeBeginning &&
457459
completionKind != CompletionKind::TypeSimpleOrComposition &&

0 commit comments

Comments
 (0)