Microsoft/monaco-editor

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

Open

#2,682 创建于 2021年10月5日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)JavaScript (1,283 fork)batch import
bughelp wantedtypescript

仓库指标

Star
 (14,836 star)
PR 合并指标
 (平均合并 6小时 26分钟) (30 天内合并 15 个 PR)

描述

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:

贡献者指南