Microsoft/monaco-editor

Import suggestions are not displayed when the caret is positioned after the last character

Open

#2 682 ouverte le 5 oct. 2021

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)JavaScript (1 283 forks)batch import
bughelp wantedtypescript

Métriques du dépôt

Stars
 (14 836 stars)
Métriques de merge PR
 (Merge moyen 6h 26m) (15 PRs mergées en 30 j)

Description

Monaco can provide a pretty nice import suggestions as following:

But it only works when the caret position is positioned before the last character or even further back. However, it does not work if the caret is positioned after the last character, which is the most intuitive place where usually import suggestions are requested, because as a developer I type out the function I'd like to import, and then I'd like to press CTRL+. to pop the suggestions, but right now I have to move the caret back at least 1 position before I can pop the suggestions, which a lot of people can miss this feature in the first place.

When I try to pop for suggestions after the last character I get the following:

Guide contributeur