为什么 VSCode 无法识别 JavaScript 展开运算符并自动完成? [英] Why does VSCode not recognize the JavaScript spread operator and autocompletes instead?

查看:28
本文介绍了为什么 VSCode 无法识别 JavaScript 展开运算符并自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在为 Visual Studio Code 的一个非常烦人的行为而苦苦挣扎.

每当我尝试使用 JavaScript

有没有办法禁用它?这真的让我发疯......我使用的是 Visual Studio Code 1.59.0(在撰写此问题时应该是最新版本).

解决方案

正如我在其他地方的评论中提到的,github 问题是 在 js 中输入重复的点会扩展到第一个建议.

在那个问题中提到了几个临时修复:

editor.suggest.showWords":假

editor.acceptSuggestionOnCommitCharacter":false

. 是 javascript 中的提交字符,因此将选择您不想要的建议之一.

[您可以增加快速建议延迟时间作为可能的修复,但我无法测试,因为我实际上无法在我的设置中重现此错误.]

[如果您仍然遇到此问题,请确保升级到 v1.59.1,其中包含一个修复程序.如果这不能为您解决问题,请提出问题.]

I have been struggling with a really annoying behaviour of Visual Studio Code recently.

Whenever I try to use the JavaScript spread syntax VSCode automatically autocompletes the next piece of code (wrongly). Note I am NOT hitting TAB. Here's a demonstration of what I'm talking about:

Is there a way to disable this? This is really driving me mad... I am using Visual Studio Code 1.59.0 (which should be the latest release at the time of authoring this question).

解决方案

As I mentioned in my comment elsewhere, the github issue is Typing repeated dots in js expands to first suggestion.

In that issue a couple of temporary fixes are mentioned:

"editor.suggest.showWords": false

or

"editor.acceptSuggestionOnCommitCharacter": false

The .'s are commit characters in javascript and so one of the suggestions will be selected that you do not want.

[You might be able to increase the quick suggestions delay time as a possible fix, but I can't test that since I can't actually repro this bug on my setup.]

[If you still are facing this problem make sure to upgrade to v1.59.1, which included a fix. If that doesn't fix it for you, file an issue.]

这篇关于为什么 VSCode 无法识别 JavaScript 展开运算符并自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆