Intellisense for JavaScript不适用于JavaScript独立文件 [英] Intellisense for JavaScript is not working for JavaScript stand-alone file

查看:146
本文介绍了Intellisense for JavaScript不适用于JavaScript独立文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试使用Visual Studio 2017创建并写入JavaScript独立文件。我开始注意到intellisense功能对JavaScript不起作用独立文件,而当我将脚本嵌入到HTML文件中时,intellisense
适用于JavaScript语言。我必须打开哪些设置或配置?

解决方案


欢迎来到MSDN论坛。


你的VS 2017版本是什么?请转到帮助 - 关于Microsoft Visual Studio以在此处检查和共享它。


我尝试创建一个ASP.Net Web应用程序,添加.html和.js文件并检查JS intellisense,它的工作原理如下:



如果我误解了你的问题,请你分享你的详细步骤来重现这个问题吗?


同时,您可以尝试使用以下步骤,在每个步骤之后重新打开.js文件进行测试:


  1. 转到工具 - 选项 - 文本编辑器 - JavaScript / TypeScript-语言服务:取消选中"启用新的JavaScript语言服务"选项
  2. 转到工具 - 选项 - 文本编辑器 - JavaScript / TypeScript:取消选中并选中"自动列表成员"和"参数信息"选项
  3. 转到工具导入和导出设置... - 重置所有设置并备份当前设置,选择'常规'恢复设置
  4. 以管理员身份运行VS 2017安装程序,使用更多修复来修复VS



最好的问候,


萨拉


Hi,

I am trying to create and write into a JavaScript standalone file using Visual Studio 2017. I am beginning to notice that the intellisense feature does not work for JavaScript standalone file, whereas when I embed the script into a HTML file, the intellisense works for the JavaScript language. What settings or configuration must I turn on ?

解决方案

Hi cally,

Welcome to the MSDN forum.

What is your VS 2017 version? Please go to Help-About Microsoft Visual Studio to check and share it in here.

I tried to create an ASP.Net web application, add an .html and .js files and check the JS intellisense, it works as below:

Could you please share your detail steps to reproduce this issue, in case I misunderstand your issue?

Meanwhile, you can have a try with the following steps, after each step and reopen the .js file to test:

  1. Go to Tools-Options-Text Editor-JavaScript/TypeScript-Language Service: uncheck the option "Enable the new JavaScript language service"
  2. Go to Tools-Options-Text Editor-JavaScript/TypeScript: uncheck and check the options "Auto list members" and "Parameter information"
  3. Go to Tools-Import and Export Settings…-Reset all settings and backup the current setting, choose ‘General’ to restore the settings
  4. Run the VS 2017 installer as administrator and More-Repair to repair your VS

Best regards,

Sara


这篇关于Intellisense for JavaScript不适用于JavaScript独立文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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