TypeScript 限制Intellisense结果的数量

w7t8yxp5  于 6个月前  发布在  TypeScript
关注(0)|答案(2)|浏览(63)

我正在使用带有TypeScript的React。现在,如果我安装了一个有很多类型的npm包,例如react-icons,智能感知会给出太多的建议,这会导致vscode变慢,并且在延迟期间输入的任何字母都不会被记录。

我不确定这个功能是否存在,但我没有找到任何相关信息。我希望有一个类似于"editor.suggest.maxResults": 100的功能,智能感知最多只会给出100个建议。

u7up0aaq

u7up0aaq1#

我最近也遇到了输入丢失和损坏的问题。输入丢失和损坏似乎与自动完成框弹出有关。

dw1jzc5e

dw1jzc5e2#

Moving this over to TypeScript as I believe this can be handled by an extension. I seem to recall that we also already addressed this for global completions (not in jsx tags)
Using the VS Code apis, TS could mark the first response as isIncomplete and filter down the list. This way completions will be re-requested as the user types, at which point TS can return a more filtered list

相关问题