22 January 2016
Corona autocomplete package now available for Atom editor
We would like to announce the immediate availability of a code completion package for the Atom editor, which provides code completion as well as a description and links to the Corona Docs.
You have two options to install the package: through Atom’s package interface or from the command line.
If you choose the Atom’s package interface, open up the Preferences screen and click on Install.
In the search box, type corona
and hit enter. The autocomplete-corona
package should show as the first option. Click on the Install
button. This will install the package and you can start using it immediately.
If you prefer, you can install it from the command line by executing:
1 |
apm install autocomplete-corona |
You may also need to enable the language-lua
package as well, to get the syntax highlighting.
This is a no-frills package that uses Corona’s own docs to provide the code completion. Simply tab to complete and then tab between parameters to fill them out.
This tool complements our Corona Editor and Corona Composer GUI tools to help you make your apps easier.
Atom also supports building your project. There is not a pre-built Corona SDK build provider. However, you can configure your own by putting an extra file in the folder with your main.lua
named:
.atom-build.json
You must include this file in every project you want to build. The contents of the file will vary depending on if you are using a daily build or public build. And it will vary between OS X and Windows.
Here is an example OS X version for public releases:
1 2 3 4 5 6 7 8 |
{ "cmd": "/Applications/CoronaSDK/Corona\\ Simulator.app/Contents/MacOS/Corona\\ Simulator", "args": ["main.lua"], "name": "Corona SDK", "cwd": "{PROJECT_PATH}", "sh": true } |
If you use daily builds change the first line to the right folder:
1 2 3 4 5 6 7 8 |
{ "cmd": "/Applications/CoronaSDK-2811/Corona\\ Simulator.app/Contents/MacOS/Corona\\ Simulator", "args": ["main.lua"], "name": "Corona SDK", "cwd": "{PROJECT_PATH}", "sh": true } |
For Windows, you will need to provide the right path to your Corona SDK install folder.
1 2 3 4 5 6 7 8 |
{ "cmd": "C:\Program Files (x86)\Corona Labs\Corona SDK\Corona\\ Simulator.exe", "args": ["main.lua"], "name": "Corona SDK", "cwd": "{PROJECT_PATH}", "sh": true } |
You must also install the build package to use this. Click here to learn more about these build scripts.
If you are an Atom fan, you will now be more empowered.
Having problems? Questions? Join the discussion in the Corona Labs Forums.
Rune
Posted at 06:45h, 23 JanuaryThe Atom editor installer from https://atom.io/ is reported as malware by a few antivirus software packages. Is the Atom Editor from this site this safe?
Rob Miracle
Posted at 15:21h, 23 JanuaryHave you reported this to Atom.io?
Lerg
Posted at 11:04h, 23 JanuaryI also recommend these packages:
https://atom.io/packages/linter
https://atom.io/packages/linter-luacheck
For linter-luacheck I use these settings. I’ve installed luacheck with luarocks:
Executable: /opt/local/share/luarocks/bin/luacheck
Globals: audio, display, easing, graphics, io, math, native, network, os, store, system, timer, transition, Runtime
Ignore: self
Dave
Posted at 12:01h, 23 JanuaryNice to see support for more editors. It would be great to get official support for the best Lua IDE too: ZeroBrane Studio (http://studio.zerobrane.com)
Roj Niyogi
Posted at 17:41h, 23 JanuaryLove feedback like this – do feel free to drop into http://feedback.coronalabs.com!
Mileni
Posted at 14:54h, 23 JanuaryJust tried it out for a 2-3 mins. And already found a couple of bugs. First one is that it doesn’t autocomplete all API-s, even tough they are there. Just to mention display.newImageRect . After I type ‘display.’ I get autocomplete. But if I add in ‘newIm..’ nothing happends.
Another one is probably easy to fix. When I click on ‘More…’ for documentation link, it doesn’t link me properly. Link is easily fixable, coz it links me to docs.local.coronalabs.com/etc…
Just removing the local in between makes things work like a charm. Author of this nice plugin should fix that 🙂
Vivek
Posted at 12:45h, 25 JanuaryHi Mileni,
The More… URL is fixed and the package has been updated.
Mileni
Posted at 14:59h, 26 JanuaryGreat. Once again, thanks for this great plugin 🙂
Dave Haynes
Posted at 06:12h, 27 JanuaryI like trying new editors. I’ve noticed a bug whenever I try to do an if…then, it wants to convert my then to timer.performWithDelay every time.
Antheor
Posted at 01:01h, 11 FebruaryGreat news.
linter-luachecks always return an error when opening a lua file 🙁
Sergey Lerg
Posted at 14:46h, 29 FebruaryIt must be installed in your system before using the plugin for it.
Atom用のプラグインがリリース | CoronaSDK入門
Posted at 06:51h, 23 February[…] Corona autocomplete package now available for Atom editor […]
Atom用のプラグインがリリース – CoronaSDK入門
Posted at 06:57h, 25 February[…] Corona autocomplete package now available for Atom editor […]
Dave Haynes
Posted at 11:15h, 10 MaySo… it’s been a few months… I tried installed the Corona Autocomplete again, and it still has the same problem I mentioned above. Example: type “if (1==1) then” and hit ENTER, and it changes “then” to “timer.performWithDelay”… That makes it unusable.
Jadiker
Posted at 22:12h, 09 August@Dave, yeah, I’m having the same problem… I really dislike it. New to Corona and this is making it quite hard to program. Has this been reported to them? Are they working on it?
Vyner
Posted at 07:11h, 11 MayI install it, how to make it works with corona??? and set it??
Rob Miracle
Posted at 07:11h, 11 AugustWe’ve pushed a new version of the plugin up. If you update your plugins in Atom, you should find this bug (and several more) fixed.