[New Release] Corona Plugin for Xcode

@wcshinestar

Thank you! I hope so too :slight_smile:

Seems to be working great for me.  One question I have, is there a way to enable quick navigation to each function (for instance in the sidebar)?  Also is there auto-indent?

@JonPM

Thank you for the feedback. 

ctrl+6 brings up the function navigator.

cmd+shift+o  for document search

To have proper indentation you need to turn off the  “Automatically indent based on syntax”  in  Xcode > Preferences > Text Editing > Indentation. Otherwise you will see strange indentation behavior.

If you need to re-indent code, highlight it and goto: Editor > Structure > Re-Indent (shortcut for this is ctrl+i  )

Let me know if you have more questions.

Thanks for your help, I am not too familiar with xCode.

I can’t get the function navigator to show.  Also when I click View > Navigators, there is not one called Function Navigator. 

Also, it doesn’t seem to be saving the syntax coloring.  I have to reselect Corona coloring each time I open a new lua file (and also for the previously edited files when I exit and reopen xCode).  Is this normal behavior?

The function navigator is not under View > Navigators - you can find it by clicking at the selection part under the popup showing on the still below. The shortcut for the popup is ctrl 6. You can use the arrow keys to select a function and hit enter to navigate to it.

still.jpg

No it is not normal behavior to have to select highlighting all the time. The plugin exports an UTI (uniform type identifier) that enables Xcode to identify and highlight .lua files automatically. Also Xcode should remember the selected highlighting even if you choose another type. 

So apparently something went wrong. Did you install other lua related plugins?

What version of Xcode are you using?

I’m using xCode 7.3.  I’ve created a new project which now seems to be retaining the syntax coloring.  However for each lua file I have to manually selected the syntax coloring each time.   

As for function navigator I’m still unable to get it to work for some reason.  Ctrl6 does nothing.  And at the top it shows scene1.lua > No Selection.

Is there a way to uninstall the plugin so I can reinstall it?

@JonPM

You are right. I just realized there is a bug in the function navigator in the public version of the plugin. I will fix it soon and let you know when it is available.

There is an un-installer option in the plugin installer. I am not sure un-installing will fix the highlight problem though. I am pretty sure the reason is that you installed some other editor that highjacked the UTI for lua files. Can you tell me what other lua IDE’s you have on your system?

Also, would you try installing this pure lua plugin - http://shakebrowser.net/lua-for-xcode/ - to see if Xcode recognizes lua files when it is installed.

Thank you very much for your help!

I’ve also got Sublime (with Corona Editor) and Zerobrane installed

Thanks. I have a hard time recreating the problem you are having with Xcode not recognizing lua files automatically.

Can you tell me if it says “Default - Corona SDK Source” in the type field (see image below) when you select a lua file that you didn’t assign highlighting to manually.

You find the type field in the utilities pane in the right side of the Xcode window. 

type.jpg