My Work On a Lua IDE

I have been working on a Lua IDE within the FREE IntelliJ IDE.

Screenshots, Screencasts, and setup instructions on the wiki page:

http://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home
Here’s an (incomplete) feature list:

Modules support
Debugger support (Experimental)
LuaDoc Support (Experimental)
Lua SDK REPL Console (Experimental)
Live Templates (“Zen Lua”)
Basic Completions
Quick Documentation with Multiple documentation providers
Resolving Globals in project and libraries
Custom API Support including custom function signatures (Experimental)
Function Information via Quickhelp
Lua Standard Library Information via Quickhelp (ctrl-Q)
Hilighting of Upvalues and Fields
Goto Symbol
Safe Delete (Experimental)
Rename Identifier (Experimental)
JavaHelp For Lua 5.1
Execution in the Kahlua interpreter
Go to definition
find usages
Code formatting
Keyword completion
1 quickfix
5 code intentions
6 code inspection
Highlighting global vs local variables
Script execution and run configurations
Kahlua interpreter window for interactive script execution (repl)
Comes with an embedded Lua compiler written in Java (Kahlua)
Structure view
Syntax checking
Syntax highlighting - including proper handling of extended syntax comments and quotes
Customizable highlighting colors
Code folding for code blocks and comments
Brace Matching for do blocks, long strings and comments, and (, { , [
Minor feature: comment in/out.

To install the Lua plugin, use the plugin manager inside IntelliJ

To do so, choose File/Settings/Plugins, and Locate the Lua plugin and right click it and choose install. [import]uid: 846 topic_id: 2200 reply_id: 302200[/import]

I have been using your plugin, all I can say is:WOW, the new update has really helped speed up my development time.

Is it possible to do function parameter autocomplete? [import]uid: 11334 topic_id: 2200 reply_id: 21478[/import]

Glad you like it. I have been developing it for almost a year - so it is nice to hear that people are enjoying it.

Im not 100% sure what you mean by parameter autocomplete, but I am working an interface to allow custom API’s (such as corona) to have auto-completion and documentation for their functions (sort of like the documentation you see when ctrl-hover over a std lua function like io.write, or table.insert.

The custom API support is already built into the plugin, and the interface to it will be included sometime between now and the 1.0 release (at the time i am writing this the current release is 0.9.51). [import]uid: 846 topic_id: 2200 reply_id: 21488[/import]

the function parameter is when after you autocomplete a function it shows you the parameters of the function ex: auto completing table.remove will show table.remove(table, index), screen cast: http://screencast.com/t/MH7e2H9w4sG

PS: I think changing the name of a variable is broken in the new release? It works great in previous versions.
[import]uid: 11334 topic_id: 2200 reply_id: 21490[/import]

I see. Ok, i’ll do my best to add it in. if it is not too difficult, ill try to get it in 1.0

Yes variable name change was broken in 0.9.50, its on my list.

Your feature request ticket is here:

http://bitbucket.org/sylvanaar2/lua-for-idea/issue/17/add-function-parameter-hints-on

[import]uid: 846 topic_id: 2200 reply_id: 21545[/import]

Your change is in the latest version [import]uid: 846 topic_id: 2200 reply_id: 22297[/import]

Great work! I’m really happy to have found this, I use IntelliJ IDEA in my day job, and really don’t know what I’d do without it.

What do I need to do to enable autocomplete functionality on Corona SDK classes (e.g. display., physics., etc)? [import]uid: 21649 topic_id: 2200 reply_id: 23434[/import]

Well, cagatay was nice enough to set up the corona API, but we haven’t posted it yet. In the meantime:

You can check out this ticket: https://bitbucket.org/sylvanaar2/lua-for-idea/issue/24/corona-sdk-import-error

and then these instructions:

https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Setting_Up_Custom_API's

[import]uid: 846 topic_id: 2200 reply_id: 23436[/import]

Great! I’ve set this up, looks good. The completions aren’t as intelligent as those in TextMate. In the short term, I’ll just edit the lua2.lua file to conform to my development patterns.

cheers! [import]uid: 21649 topic_id: 2200 reply_id: 23437[/import]

the completions and quickdocs are done, and can be found here:

https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Corona%20API%20Support [import]uid: 846 topic_id: 2200 reply_id: 24162[/import]

@akhtar

Great work there. Thank you so much!

Question:

Is there any way, currently, to have Corona function arguments/parameters shown in the tooltips? I see that the .properties file for WOW API is richer than the corresponding one for Corona -is this because it is made just for autocompletion?

If yes, are you planning to enrich the file so that arguments inspection inside IDE is possible, just like te wow example? That would be awesome!

I see that the Corona online API docs are well structured, so we could grab the “Syntax” snippet for each API function with a lua script.
Thanks again for your time! [import]uid: 7356 topic_id: 2200 reply_id: 24398[/import]

Magenta:

The files you need are on this page:

https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Corona%20API%20Support

The Corona properties file is fully completed, so you should have full parameter info just like in the wow example if you set it up.

Docs are moving to a lua based mechanism now, so that you can supply them with a lua script (that is how the wow docs are working currently and the corona ones will be soon enough)

Here is the current wow documentation file (its Lua based)

https://bitbucket.org/sylvanaar2/lua-for-idea/src/452197717dc7/test/plugin/api/wow-api.doclua [import]uid: 846 topic_id: 2200 reply_id: 24411[/import]

@akhtar

This is great!

I can now properly see full arguments listing.

However, some functions (which are included in .lua) are not included in the .properties file. With the lua based mechanism you described, are you planning to make the argument retrieval procedure fully automated so that the functions are constantly in sync with the online docs? That would give an excellent documentation solution for Corona users!

PS: I am starting to love IntelliJ … especially with your documentation solution it is a very nice editor to work with! Bye bye TextMate… [import]uid: 7356 topic_id: 2200 reply_id: 24426[/import]

Work great!!!
We decided to use this Editor in our studio.
Thank you very much. [import]uid: 9190 topic_id: 2200 reply_id: 29452[/import]

Well done, akhtar.

I installed your plug-in and Corona’s API but I still can’t figure out how to debug and launch Corona simulator from IDEA. Can anyone provide me details how to set it up?

Thank you very much in advance. [import]uid: 48794 topic_id: 2200 reply_id: 32279[/import]

Looks great, I’ll give it a try as I’ve been looking for an IDE and haven’t found one I’m happy with yet. Any plans to support the Corona debugger? This would be huge for me. [import]uid: 8692 topic_id: 2200 reply_id: 32573[/import]

Dudes. This is a Lua IDE. Continue to run your debugger as you have been. [import]uid: 21649 topic_id: 2200 reply_id: 32576[/import]

bsoisoi, are you saying an IDE shouldn’t have a built in visual debugger? Seems like an obvious feature for an IDE nowadays. [import]uid: 8692 topic_id: 2200 reply_id: 32578[/import]

As an embedded Lua user you would have no use for a generic Lua debugger. You would want the debugging features from the Corona SDK.

I am looking into how best to provide such features, but for now you do have existing tools that can be configured to work with the IDE.

Maybe when I get some time this weekend I can put together a screencast. [import]uid: 846 topic_id: 2200 reply_id: 32579[/import]

>> As an embedded Lua user you would have no use for a generic Lua debugger.

Agreed, my suggestion was to integrate with the Corona SDK debugger so we could debug apps in the IDE running on the Corona simulator. I’d love to learn more about what you mean by configuring existing tools.

Ideally what would be a great integration feature would include being able to set breakpoints in a source file in the IDE, step through code from the editor and provide views for the stack trace, local variables, and watch expressions.

I’ll give the IDE a try and see how it works, from the screenshots looks really good! [import]uid: 8692 topic_id: 2200 reply_id: 32590[/import]