I manage to get perfect code completion when working with npm and ES6 modules – but how do I get code completion when I just have a single HTML with the JS included via script tag?
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<body>
<script src="https://d3js.org/d3.v4.js"></script>
<script>
d3.select("body") // Unresolved variable or type d3
</script>
</body>
I tried adding D3 as a library (Project Settings > Libraries) – to no avail.