Autocomplete does not trigger sometimes
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
**Describe the bug**
Follow up from #2949
Autocomplete (`CTRL+Space`) does not trigger while the cursor is against special characters `[]{}` (this can happen randomly - when the matcher deems fit see https://github.com/Kong/insomnia/issues/2949#issuecomment-756052644).
**To Reproduce**
Steps to reproduce the behavior:
1. Create PUT/POST request
2. Set Body to `JSON`
3. Enter:
```json
{
"Hello": ["World"]
}
```
4. Place cursor against `[` (e.g. `[|`)
5. Press `CTRL+Space`
The autocomplete dropdown will not be shown.
**Expected behavior**
1. Autocomplete does not attempt to match against `[]{}` like VSCode
1. When no matches are found autocomplete dropdown is shown with "No autocomplete matches found"
**Screenshots**
Hard to add a screenshot of this, follow steps to reproduce.
**Desktop (please complete the following information):**
- OS: macOS Catalina / Windows 10
- Installation Method: DMG / EXE
- App Version: Core & Designer (2020.5, 2020.4, develop)
Contributor guide
Research direction
Start by reproducing the issue in a JSON request body with the cursor beside `[`, `]`, `{`, or `}`, then trace the autocomplete matcher used by the editor. Done means autocomplete can be invoked beside these characters and shows “No autocomplete matches found” when there are no matches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100