简体   繁体   English

javascript Intellisense 适用于<script> of html but not in .js file

[英]javascript Intellisense works on <script> of html but not in .js file

Using Visual Studio Code, intellisense is not working correctly in a .js file.使用 Visual Studio Code,智能感知在.js文件中无法正常工作。 VSCODE version 1.56.2 (user setup) VSCODE 版本 1.56.2(用户设置)

.js 文件中没有智能感知

The intellisense does work correctly in a <script> tag within a .html file.智能感知在.html文件中的<script>标签中可以正常工作。

Intellisense 正在处理 html 的脚本标签

I tried the steps in Visual Studio Code Intellisense not working for Javascript but it's not working either.我尝试了Visual Studio Code Intellisense 中的步骤对 Javascript 不起作用,但它也不起作用。

Thanks for the help but I figured it out.感谢您的帮助,但我想通了。 It was an in-built pre-disabled extension for JavaScript and typescript它是 JavaScript 和 typescript 的内置预禁用扩展

扩大

try to install this extension in your VS Code :尝试在你的 VS Code 中安装这个扩展:

在此处输入图片说明

try the following extension Visual Studio IntelliCode尝试以下扩展Visual Studio IntelliCode

and restart your VSCode and System并重启你的 VSCode 和系统

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

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