Bad Autocompletion on resource types after `.` or `/`
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
v0.4.1124
**Describe the bug**
When typing a resource name in auto completion, auto complete seems to forget everything you've typed so far if you get to a `.` or a `/`, which leads to some surprising completion results.
**To Reproduce**

Now type `/w`. I'd now expect `Microsoft.OperationalInsights/workspace` to be the top result. Instead you end up with completely unrelated results. It seems as if auto completion is ignoring everything before the `/` and just searching on `w`

Contributor guide
Research direction
Reproduce the autocomplete steps in the issue using Bicep v0.4.1124, including completion after a resource type's `.` and `/`. Trace which autocomplete search input is used for the typed resource name, then verify that the full prefix affects the results and places `Microsoft.OperationalInsights/workspace` first for `/w`.
Written by the indexing model from the issue text.
Assessment
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100