Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
hpl3:3rdparty:codelite [2015/09/29 20:51] jens |
hpl3:3rdparty:codelite [2015/10/06 07:04] jens |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== CodeLite - How to get started ====== | ====== CodeLite - How to get started ====== | ||
+ | |||
+ | //Alternate community created guide with images can be found here // //[[https://wiki.frictionalgames.com/hpl3/community/scripting/codelite_setup_with_pictures|wiki.frictionalgames.com/hpl3/community/scripting/codelite_setup_with_pictures]]// | ||
- [[http://www.codelite.org/LiteEditor/Download|Download the latest CodeLite release.]] | - [[http://www.codelite.org/LiteEditor/Download|Download the latest CodeLite release.]] | ||
- | - Launch CodeLite and configure: | + | - Launch CodeLite and configure: \\ <nowiki>*</nowiki> Settings→Code Completion→Display and Behavior: Activate "Keep function signature un-formated". |
- | * Settings→Code Completion→Display and Behavior: Increase number of items to display to 200. | + | |
- | * Settings→Code Completion→Display and Behavior: Activate "Keep function signature un-formated". | + | |
* Settings→Code Completion→ctags→Search Paths: Add a path to "redist/script". | * Settings→Code Completion→ctags→Search Paths: Add a path to "redist/script". | ||
* Settings→Code Completion→ctags→Advanced: Add<nowiki> *</nowiki>.hps to file types list. | * Settings→Code Completion→ctags→Advanced: Add<nowiki> *</nowiki>.hps to file types list. | ||
Line 11: | Line 11: | ||
* (optional) Settings→Code Completion: Configure the rest to your liking. For example, auto-show & case sensitive enabled. | * (optional) Settings→Code Completion: Configure the rest to your liking. For example, auto-show & case sensitive enabled. | ||
* Settings→Colours and Fonts→Customize, select C++ and in Global Settings add <nowiki> *</nowiki>.hps to the File Extension list. | * Settings→Colours and Fonts→Customize, select C++ and in Global Settings add <nowiki> *</nowiki>.hps to the File Extension list. | ||
- | - Create a new workspace. | + | - Create a new workspace. Do this by going to Workspace menu and select "New Workspace…". Pick C++ Workspace. Name is as you like and set the workspace path as you like **as long as it is on the same drive as SOMA.** |
- | - Create a new project in the workspace. Use template Others → None-code project. | + | - Create a new project in the workspace. Do this by right-clicking on the workspace in the list to the left and choose the Create New Project option. Select others -> Non-code project. Name as you like and leave rest as default. |
- | * Right-click on project folder, choose Import files from directory .. Import "redist/script/". | + | - Add one folder to the project. Right-click on the project folder and choose New Virtual Folder. Name it _api (you can create others later when you know more). |
- | * Right-click on project folder, choose Import files from directory .. Import "redist/maps/". | + | - Time to add files to the project. \\ <nowiki>*</nowiki> Right-click on _api and Add An Existing File, add the file "SOMA GAME FOLDER LOCATION/hps_api.hps" (might need to launch the game executable one time to have this file created). |
- | * Right-click on project, New Virtual Folder, name it "_api". | + | * Right-click on the **project** in the list to the left, pick Import Files From Directory. Navigate to the SOMA GAME FOLDER and select it. In the next window, check the boxes for maps and scripts and make sure that the <nowiki>*</nowiki>.hps file extension is present in the list of extentions to import. Click OK. |
- | * Right-click on _api and Add An Existing File, add the file "redist/hps_api.hps" (might need to launch the game executable one time to have it created). | + | |
+ | That should be it, you should now have three top folders in your project and a lot of sub-folders with various script files. Hps files should be color coded and parsed for completion as you open them in the project. If they do not, you can re-tag the workspace, project or the single file to see if it helps. | ||
- | That should be it, .hps files should be color coded and parsed for completion as you added them to the project. If they did not, you can re-tag the workspace, project or the single file to see if it helps. If no color coding, it can be forced in View→View As: C++. | + | Start typing something, for example Entity (depending on configuration this can be case sensitive!) and a drop down should appear showing all the functions that begin with Entity and the documentation for each selected function. You can force things to appear using these shortcuts: |
* ctrl-space will bring up the completion drop down. | * ctrl-space will bring up the completion drop down. | ||
* ctrl-shift-space will bring up hints when inside the () of a function. | * ctrl-shift-space will bring up hints when inside the () of a function. | ||
- | * ctrl-left-click on #include, variables, functions etc will open/move cursor to their location. | ||
===== Issues & Info ===== | ===== Issues & Info ===== | ||
Line 33: | Line 33: | ||
==== Extra Info ==== | ==== Extra Info ==== | ||
- | Info about Settings→Colours and Fonts→Customize→Styles->Edit Lexer keyword sets, Set 0 to Set 4: | + | Info about Settings→Colours and Fonts→Customize→Styles→Edit Lexer keyword sets, Set 0 to Set 4: |
* Set 0 User configured list of keywords not already parsed. Can be edited. | * Set 0 User configured list of keywords not already parsed. Can be edited. |