[ZeroBrane Studio] Re: Add autocomplete for a library

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Fri, 26 Sep 2014 12:51:56 -0700

Hi Steve,

> I’ve closed Zerobrane & re-opened it and was expecting to be able to type
> “st.” to get the list of Log & SleepMillis as autocomplete options, but
> didn’t.  Am I using it wrong?  I followed
> http://studio.zerobrane.com/doc-api-auto-complete.html.

The structure of the files you have looks good, but you seem to have a
syntax error in test.lua file; when you start ZBS you should see a
message in the output window: "Error while loading API file:
api\lua\test.lua:14: '}' expected (to close '{' at line 7) near
'SleepMillis'". After fixing it, the files work for me as expected.

There is a bit simpler way to do this that avoids modifying
luabase.lua file, but it requires a couple of small changes to ZBS
that should be available in few days.

Paul.

Other related posts: