How do I turn off intellisense for javascript?

2020-06-07 04:58发布

While editing javascript content VisualStudio is starting to bug me with how it keeps inserting highlighted suggestions. For example it keeps inserting valueOf( if I type val(. This is really annoying.

I want to invoke intellisense manually just like I can with C#, is there any way of turning off the auto-complete suggestion or at least preventing it from selecting an entry for me?

4条回答
孤傲高冷的网名
2楼-- · 2020-06-07 05:10

I tried Myra's solution but it didn't solve it completely for me due to ReSharper. Turned out it was the ReSharper intellisense that autocompleted whatever I was writing to the current/top option in the intellisense list, not the VS default intellisense.

I fixed this by turning off ReSharper's JavaScript support completely by going to ReSharper -> Options -> Products & Features -> Uncheck JavaScript and TypeScript.

This might not be a good solution if you depend on any other JavaScript- or TypeScript-related features in ReSharper but I finally got control of the intellisense. Peace, at last...

(Just to be clear, I still have the "Autolist members" and "Parameter Information" options as described in Myra's post above checked/activated, and the "Only use Tab or Enter to commit" option as described in Brett Ryan's comment above also checked/activated)

查看更多
ゆ 、 Hurt°
3楼-- · 2020-06-07 05:12

for me it was also resharper (replacing my .each with .forEach), and what I did is go to menu

Resharper -> Options    
Environment -> IntelliSense -> Autopopup    
select JavaScript tab    
"After dot" -> select "Display but do not preselect" in the dropdown
查看更多
Animai°情兽
4楼-- · 2020-06-07 05:21

I realize resharper isn't mentioned in the question, however there is an easy solution if you're using it.

Navigate to Resharper -> Options -> Intellisense -> Completing Character. Once there, add ".val(" to the "Do not complete on" text field beside the JavaScript row.

Like so:

enter image description here

查看更多
叼着烟拽天下
5楼-- · 2020-06-07 05:35

In Visual Studio Tools > Options > Text Editor > JScript
In corresponding panel as Statement completion
Uncheck Autolist members & Parameter Information

I think that should do the trick

查看更多
登录 后发表回答