Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support other Lua libs? #3

Open
zilongshanren opened this issue Apr 12, 2016 · 2 comments
Open

How to support other Lua libs? #3

zilongshanren opened this issue Apr 12, 2016 · 2 comments

Comments

@zilongshanren
Copy link

I have lots of Lua APIs, how could I generate file like https://github.com/ptrv/company-lua/blob/master/lua/api/love2d.lua?

Is there any scripts to do this?

If there is a easy way to support other Lua libs, it would be pretty awesome! 😄

Thanks.

@ptrv
Copy link
Owner

ptrv commented Apr 15, 2016

Hi @zilongshanren

Unfortunately there is no script for generating api files. I copied the api from ZeroBrane Studio

There is also a wiki entry for the api file format here: https://studio.zerobrane.com/doc-api-auto-complete

I guess you would have to write the api generation script yourself.

@se4u
Copy link

se4u commented Jul 7, 2017

@ptrv I only saw the api docs now thanks to this issue :). I saw in the doc that

When valuetype is specified for a method or a function, it is used for auto-complete type guessing. 
... e.g. if somefunc has valuetype of math, then after test = somefunc(), typing test. 
will be treated as math. in auto-complete logic.

When inherits is specified for a class, it is used by auto-complete logic to suggest values, 
functions, and methods from the base class(es) in addition to the methods from the current 
class. You may specify several classes (inherits = 'a b') and complex class names 
(inherits = 'b2.Shape'). The entire inheritance chain will be looked at during the analysis.

Does company-lua fully support this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants