Bittu Joshi
Bittu Joshi

Reputation: 528

Not getting auto-complete for JavaScript in new VsCode version

I used to get auto-complete and intellisence hints earlier but now I don't get auto-complete, nor do I get squiggly red line for errors. What do I do? Please help. I already spent 2 hours searching on google but can't find answer.

enter image description here

Others are getting proper suggestions like above. I ain't getting that. Below is my VsCode editor.

enter image description here

Upvotes: 10

Views: 23167

Answers (4)

Burningwaflz
Burningwaflz

Reputation: 59

I was getting partial autocompletion. The issue for me was that I accidentally added this to my settings.json:

"editor.suggest.showConstants": false

Removing it solved the issue.

Upvotes: 0

danishpeer
danishpeer

Reputation: 3

You need to install types/node in order to get the autocomplete. https://www.npmjs.com/package/@types/node

Upvotes: 0

Anuradha Liyanage
Anuradha Liyanage

Reputation: 11

if you have script as below get rid of the type. then it will work

<script type="text/Javascript">
doucument.write("test");
</script>

get rid of the "text/Javascript" part enjoy

Upvotes: 1

Bittu Joshi
Bittu Joshi

Reputation: 528

After surfing a lot in settings of VsCode, I finally figured out two things that might be causing this problem. Solved both of them and now the auto-complete is working fine for my nodeJs files in VsCode.

  1. Install ESLint and JavaScript (ES6) code snippets extensions for providing intellisense for js code.

enter image description here

  1. Enable auto-complete if you disabled it by mistake. This should fix the problem. settings > search javascript/typescript > search auto-complete in the extension settings and turn it on.

enter image description here

Upvotes: 14

Related Questions