Garethp / ScreepsAutocomplete

Autocomplete for Screeps
478 stars 105 forks source link

Screeps Autocomplete

The purpose of this is to add screeps autocomplete to IDEs by creating a definition from the documents. People can then add this project as a library in their IDE, and their IDE should be able to start autocompleting their code. Tested somewhat in JetBrain's WebStorm

How to Install

Webstorm (Or Other Jetbrains IDE's)

This can be done by quite simply copying the ScreepsAutocomplete folder in their project, and Webstorm should automatically detect it and add it to the autocompletion

Adding it as a library

Instead of copying the ScreepsAutocomplete folder to each and every project folder, you can add it as a global library.

Webstorm should automatically detect the library and add it to the autocompletion.

Visual Studio

  1. Create a new empty web site (File -> New -> Web Site -> ASP.NET Empty Web Site) and set the location to the location of your program.
  2. Copy the ScreepsAutocomplete folder into your project and create a new file called _references.js (right click in solution explorer -> Add New Item -> _references.js).
  3. Right click within the empty file and select Update JavaScript References which will populate the file and make autocomplete avaliable.

Video

Sublime Text

There are two ways to enable Autocomplete in Sublime Text, both of them require installing a plugin through Package Control, and copying ScreepsAutocomplete in to your project.

Atom

Integration with Atom is done through use of the atom-ternjs package. Here's the steps