Garethp / ScreepsAutocomplete

Autocomplete for Screeps
478 stars 105 forks source link

Install Guide. #10

Open RevenantOne opened 9 years ago

RevenantOne commented 9 years ago

I'm pretty new to this. Only used Visual Studio before so I'm not sure how to go about this. Could you explain what IDE's are supported and how to install this?

Thank you.

Zinal001 commented 9 years ago

Most IDE's can handle this pretty easy. I'm not sure but I do believe Visual Studio 2015 can handle javascript files. Other IDE's that I know works are Eclipse and JetBrains WebStorm. I personally use WebStorm, but it's not free. Eclipse works perfectly with this as well.

You might want to download Github's client as well, since these files get updated once in a while. I've forgotten to update these files so they are not 100% accurate with Screeps right now, but I'm gonna update them as soon as possible. Nevermind that. As soon as Garethp accepts my pull request the documentation will be up-to-date with the current version of Screeps.

How to "install" this depends on what IDE you decide to use.

RevenantOne commented 9 years ago

I've only ever really used Visual Studio (the free versions) before. I'm not sure if they count as IDE's, but I've been looking at Sublime Text 3 and Visual Studio Code recently. Is it possible to install for these?

If not, could you explain how to install it for Eclipse?

Cheers

Zinal001 commented 9 years ago

I tried both Sublime Text 3 and Visual Studio Code, but couldn't get them to work properly (They might work, but I have no idea on how to do it).

If you are going to use Eclipse I recommend downloading it from Here.

Setting up Eclipse is quite easy. First, Install it (Make sure it is the Javascript Web Developers edition!). Start it and then create a new JavaScript Project. (File -> New -> JavaScript Project). Name the project whatever you want and then press Finish. Once done, you'll see "Script Explorer" on the left side. (You might have to close the Welcome window first). Expand the folder with your project's name and right-click JavaScript Resources. Then click Properties.

A new window opens. Make sure you are on the "Libraries" tab and click the Add JavaScript Library button.

Another window. Select "User Library" and then next. On the next screen press "Configure User Libraries..." button.

Now the "User Libraries" window opens. Press new and name your new library whatever you want (I usually go with ScreepsAutocomplete, but choose whatever you want, it's not important).

Now select the library you just made and click the "add folder..." button. Select the folder for this GitHub project (or where you extracted the files, if you downloaded them manually).

Now press OK, Finish then OK again (to close all open windows). If you expand the "JavaScript Resources" now you should see your library's name.

All setup and done! Create a new javascript file (I usually start with main.js, which is the main file on Screeps) and codes from there.

Garethp commented 9 years ago

Thanks @Zinal001 I'm going to admit, I have no idea how to get this running in Visual Studio, and I don't run Windows at the moment so I can't give it a test. If you're keen on staying in Studio, this is about the only resource I could find with a quick google search on adding it to Visual Studio. Maybe in a bit I'll write an install guide for Jetbrains, Eclipse and Sublime in the README.md of this project

sebb7y commented 8 years ago

Maybe in a bit I'll write an install guide for Jetbrains, Eclipse and Sublime in the README.md of this project

Will you do this? or could you just quickly tell me how you could make this work with sublime - if you indeed can.

Garethp commented 8 years ago

Hi

Yeah, there's been a fair delay. I haven't used this library, or played Screeps, in a very long time. But it seems it's getting a lot more attention now, so I'm looking in to it. For Sublime Text, it seems like the best way I've found so far is using a Sublime Text plugin called TernJS. Once you've installed this, having ScreepsAutocomplete in your folder (maybe under a lib folder?) should give you autocompletion. I'm looking at how to get more detailed documentation to show up with it though

ZeekDaGeek commented 8 years ago

I was completely unable to get TernJS working with Sublime Text 3, here's an alternative:

{
    /*
       Defines a configuration for each language.
    */
    "codeintel_language_settings": {
        "JavaScript": {
            "codeintel_scan_extra_dir": [],
            "codeintel_scan_exclude_dir":["/build/", "/min/"],
            "codeintel_scan_files_in_project": true,
            "codeintel_max_recursive_dir_depth": 2,
            "codeintel_selected_catalogs": ["jQuery"]
        }
    }
}

If you can tell me how to get Tern working I would be interested.

Garethp commented 8 years ago

Hm... I can't really say I did anything special to get TernJS working. All I did was copy ScreepsAutocomplete in to my project, then used PackageControl to install the TernJS plugin. Restarted my SublimeText, waited a minute or two to let the plugin boot up or whatever and then typed

var room = new Room();
room.loo

And let Autocompletion go to town. I'll add instructions for both TernJS and SublimeCodeIntel. I tried SublimeCodeIntel, but didn't know I had to modify the settings, so I was wondering why it didn't work

Garethp commented 8 years ago

Can't seem to make it work in Eclipse, but I've got VS and Sublime Text up, which seemed to be the most requested

VirtualEvan commented 8 years ago

Would be possible to make this work with atom?

JanLauGe commented 8 years ago

It does

On Sat, 3 Sep 2016, 20:14 Esteban Puentes, notifications@github.com wrote:

Would be possible to make this work with atom?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Garethp/ScreepsAutocomplete/issues/10#issuecomment-244564766, or mute the thread https://github.com/notifications/unsubscribe-auth/AOTNWL7Wb1P3Y5g3uilCVSyiamo_6r3aks5qmcccgaJpZM4GNMSv .

Stiiiiz commented 8 years ago

Hello, I've been trying to make this work with Adobe Brackets. I found an add-on for Brackets called Ternific but since i'm really not a specialist, i really have no idea how to make it work.. Any help would be greatly appreciated. Best

EDIT: Managed to make it work. Brackets didn't need the Ternific extension. Once I deactivated extension, it started working. xD

So, for Brackets, simply create a .tern-project file with (the code given for Atom IDE):

{
  "ecmaVersion": 6,
  "libs": [],
  "loadEagerly": [
  "ScreepsAutocomplete/**/*.js"
  ]
}

and place it in the "default" folder with your other Screeps files.

Thanks @Garethp for your work 👍

Garethp commented 8 years ago

Thanks @Leakimski I'll look at adding that to the readme

R00tD00m commented 7 years ago

still can't get this to work in Atom... :( the package " atom-ternjs" doesn't seem to exist in the Atom package repository :(

VirtualEvan commented 7 years ago

Console: apm install atom-ternjs That should work, then just follow the readme

SlasherZet commented 7 years ago

I can't get the autocomplete working with Eclipse... Adding it to libraries as described by Zinal001 does nothing, neither does copying the folder to the project. I'm at a loss... can somebody suggest how to make it work?

lerugray commented 6 years ago

I've tried all these suggestions, for the life of me, I can't get this to work in sublime