Let’s say I want to draw a line. The command is: display.newLine(...)
If I open sublime’s auto-complete ‘while’ I am still typing/on ‘display’…it’ll work:
display.newLine([parent,], x1, y1, x2, y2[, x3, y3, ...])
But if auto-complete is opened ‘after’ I am finished typing display and ‘while’ I’m typing newLine I get:
newLine([parent,], x1, y1, x2, y2[, x3, y3, ...])
i.e. display.newLi is auto-completed into newLine(…). Which I don’t think is what anyone would want. Similar behaviour if you are trying to save to a variable like
local line_1 = display.newLine(...)
will regularly turn into the seemingly useless
local line_1 = newLine(...)
In the auto-completions there is only one entry named below to select/tab-into, so there is no ambiguity on what ‘should’ happen:
display.newLine() …display
I thought I could go into corona.completions-legacy corona.completions-public corona.completions-daily and find the trigger for “newLine” and delete it…but it’s not there instead we have:
in public we have:
{ "trigger": "display.newLine()\tdisplay", "contents": "display.newLine( ${1:[parent,]}, ${2:x1}, ${3:y1}, ${4:x2}, ${5:y2} ${6:[, x3, y3, ... ]} )" },
in legacy we have:
{ "trigger": "display.newLine()\tdisplay", "contents": "display.newLine( ${1:[parent,]}, ${2:x1}, ${3:y1}, ${4:x2}, ${5:y2} )" },
in daily we have:
{ "trigger": "display.newLine()\tdisplay", "contents": "display.newLine( ${1:[parentGroup,]}, ${2:x1}, ${3:y1}, ${4:x2}, ${5:y2} ${6:[, x3, y3, ... ]} )" },
These are all different, I am very confused how to navigate this or how there are 3 to begin with and what takes precedence over what and where…are these all applying by default? should I be deleting two of these files? I don’t know.
My best terrible guess is there’s something somewhere that is overwriting the behaviour of all 3 of these files cause of the aforementioned testing behaviour. I’m sure the period between display and newLine has something to do with it. I have my auto-complete setup so I can either manually turn it on via ctrl+enter… or I can start typing, stop, and then wait half a second and it’ll turn on automatically (cause sublime snippets don’t always take precedence over sublime completions even though they are explicitly stated to do so, and I prefer not having auto-complete open 24/7 anyways). I did test via both
methods, no difference. Normally I bypass this problem by creating my own shape obj function and completions for said function (so I can fit 4 lines of properties into 1), but sometimes the defaults are better used…so I need a fix.
And is there a better category to post questions about “the official corona SDK plugin” other than ‘general question’?