2

How do I configure VS Code to provide JS documentation, for example on the filter method? Whenever I hover over filter, I get any which is highly useless.

enter image description here

I've looked at this SO question and was able to get ⌘ + Shift + Space working for triggering parameter hints, but that only works inside parentheses where the parameters go.

(Show definition preview hover doesn't work for me either as per this answer, which makes me sad.)

I've even reinstalled VS Code.

I've tried installing docs view, but that gets any too:

enter image description here

starball
  • 20,030
  • 7
  • 43
  • 238
saner
  • 399
  • 4
  • 13

1 Answers1

0

I'm pretty sure you're not getting suggestions from JavaScript Array methods because what you're writing is not valid JavaScript. What you've written (new int[size]) is like Java / C++ syntax. In JavaScript, you do new Array(size).fill(0). Once you write legitimate JavaScript, you'll get what you want.

starball
  • 20,030
  • 7
  • 43
  • 238