Calculator Community > Lua

Nspire-Lua IDE : plugin for Intellij IDEA

(1/5) > >>

Adriweb:
I have talked about "Intellij IDEA" on the tinspire group as a Lua IDE (thanks to its wonderful Lua plugin), and I believe it can be quite good for you guys, especially for big projects where the current SDK isn't efficient (no support of multiple files etc.).

Here's some details on how to setup what you can see at the bottom of this post ;)

Basically, you can do either :
This (longer but it will make seperate SDKs for normal computer Lua and Nspire Lua)
[*]Download Lua for windows 5.1
[*]Add a new Lua SDK in Intellij (you can find that in the module settings, for example)
[*]Select the Lua folder in program files as the lua sdk folder.
[*]Download my addon and decompress it somewhere
[*]Add from my addon the folder "nspirelua-api" as an external classpath folder in your new SDK
[*]Save, apply, etc.[/list]

or (easier/faster but it will make computer lua think it has nspire lua API available) :
[*]In Intellij's ( / module's ) settings, edit the KahLua SDK
[*]Download my addon and decompress it somewhere
[*]Add from my addon the folder "nspirelua-api" as an external classpath folder in your new SDK
[*]Save, apply, etc.[/list]

After all that, create a new Lua project, and in the libraries on the left side, you should see not only the stdlib (of which you can unlink the io and debug API which aren't present on the Nspire), and you should be able to enjoy Intellij's Lua plugin things but for the Nspire Lua API too.
This it what it looks like when it's set up, on my computer :

Autocompletion example (of the events and other functions ) :






Auto-completion + arguments help :




Interactive documentation based onInspired-Lua's wiki :  (Ctrl-Q on a word)




Nspire-Lua API plugin : download here (http://tiplanet.org/forum/archives_voir.php?id=8182)


Good luck and have fun :)[/list][/list]

ElementCoder:
Wow this is awesome! Can it run the programs too or do you still need the TINCS/Handheld to test? (I guess the latter :P)

Adriweb:

--- Quote from: ElementCoder on October 19, 2012, 04:04:03 am ---Wow this is awesome!

--- End quote ---
Thanks :)


--- Quote from: ElementCoder on October 19, 2012, 04:04:03 am ---Can it run the programs too or do you still need the TINCS/Handheld to test? (I guess the latter :P)

--- End quote ---
Indeed this is just for editing.

But then you have for example Luna, which you can use in a shell script to build your files and open the .tns in the software etc, all that called from within the IDE with a build configuration.

We use that for FormulaPro : https://github.com/adriweb/EEPro-for-Nspire/blob/master/build.sh

Edit : however, if you want to test out some algorithms for example, written in "pure" lua, it will run indeed in the console :) (for that you have to install Lua for your computer tho)

Jim Bauwens:
Note that FormulaPro will eventually use the new build system I made :)

Nice work Adriweb !

Adriweb:
Thanks :)

Navigation

[0] Message Index

[#] Next page

Go to full version