让 Intellij Idea 看到 Phaser 库

Make Intellij Idea see Phaser library

我正在使用 Intellij Idea 中的 Phaser 库。我希望我的 IDE 能够在我打字时显示可能性。我怎样才能做到这一点?例如,如果我输入:

jumpButtonUp = game.input.keyboard.addKey(Phaser.Keyboard.U);

我想IDE显示所有结局选项。其中之一是 UP.

我不使用 IntelliJ IDEA,但基于 the documentation for Configuring JavaScript Libraries,可以通过终极版执行此操作。

有一个 Configuring a custom JavaScript library 部分,开头如下:

  1. Open the Settings / Preferences Dialog [...] by choosing File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for macOS. Expand the Languages and Frameworks node, and then click Libraries under JavaScript.
  2. The JavaScript. Libraries page that opens shows a list of all the already available libraries. Click Add.