0

I know that the prediction and autocomplete work on javascripts own functions but they don't seem to work if I try to use it with foreign libraries. Do I need to tell VSC where those .js-files are that should be included?

It works on my own created functions btw. which is not really helpful when you're mostly working on other libraries..

The most similar question I've found so far has no working answers to it: Visual Studio Code enable suggestion code JavaScript like in WebStorm

E_net4
  • 27,810
  • 13
  • 101
  • 139

1 Answers1

1

Any library that has proper JSDoc would support auto completion in VS Code. Since glMatrix has it, it could be done without a problem.

Here's working image:

vs-code

zmag
  • 7,825
  • 12
  • 32
  • 42
  • thx, I didn't know that I would have to import it since the library itself would work even without the import :) – l33t5p34k3r Apr 24 '19 at 23:06
  • okay, now that I've imported it the way you did I get the auto completion, but it doesn't compile anymore? Chrome tells me that it is undefined.. (gm.mat4.create() should return a matrix for example) – l33t5p34k3r Apr 25 '19 at 12:17
  • You need a bundler like Webpack to use `import` syntax. – zmag Apr 25 '19 at 16:23