Support for Multiple FilterText Values in CompletionItem
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Issue Title:**
Support for Multiple FilterText Values in CompletionItem
**Issue Description:**
Currently, CompletionItem only supports a single FilterText value. However, there are cases where multiple terms should match a single completion item.
**Proposal:**
Allow CompletionItem to accept an array of FilterText values instead of just one.
**Languages applicable:**
C#
VB.NET
**Code Example (Current Limitation):**
```
var item = new CompletionItem(
displayText: "foreach",
filterText: "for" // Only a single filter text is allowed
);
```
🚨 Problem: If I want "foreach" to appear when the user types "for" or "loop", I can't do that today.
**Proposed Solution:**
Add support for multiple filter terms:
```
var item = new CompletionItem(
displayText: "foreach",
filterText: new[] { "for", "loop", "foreach" } // Allow multiple filter texts
);
```
**Use Case & Justification:**
Helps match different user intents (e.g., "func" should match "function" and "fn").
Improves IDE experience by reducing unnecessary typing.
Contributor guide
Assessment
This issue has not been assessed yet.