简体   繁体   English

为什么 VSCode 不自动完成?

[英]Why doesn’t VSCode autocomplete?

Once VSCode autocompletes fine, once it does not complete my text.一旦 VSCode 自动完成,一旦它没有完成我的文本。

I would like VSCode to autocomplete for example if I write an Array, I would like to show the available methods for arrays (JavaScript).例如,如果我编写一个数组,我希望 VSCode 自动完成,我想展示 arrays (JavaScript) 的可用方法。

Also can someone tell me what I need to download to autocomplete the JSX tags, too (in React)?也有人能告诉我我需要下载什么来自动完成 JSX 标签(在 React 中)吗?

Since javascript is a loosely typed language, IDEs (including but not limited to VSCode) can't figure out much about your code and so can't provide good autocompletion.由于 javascript 是一种松散类型的语言,IDE(包括但不限于 VSCode)无法了解您的代码,因此无法提供良好的自动完成功能。 There's not much you can do about this, except use another language.除了使用另一种语言之外,您对此无能为力。 Typescript is one you might consider. Typescript是您可能会考虑的一种。 It's a superset of javascript, adds in type annotations, and has good integration with VSCode and its intellisense autocompletion.它是 javascript 的超集,添加了类型注释,并且与 VSCode 及其智能自动补全有很好的集成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM