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

[Question] How do you add an application's API to Intellisense? #48

Closed
bryab opened this issue Jun 13, 2019 · 7 comments
Closed

[Question] How do you add an application's API to Intellisense? #48

bryab opened this issue Jun 13, 2019 · 7 comments
Labels
feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) question User has a question

Comments

@bryab
Copy link

bryab commented Jun 13, 2019

I am using Lua for the purpose of writing scripts for the application Blackmagic Fusion. My wish would be to have API auto-completion/intellisense based on that application API. I'm willing to put in the work to put the API into some format that VS Code can interpret, as I have done for other projects (Typescript). But I am unsure how to go about this. Thank you for any help!

Here's an example of the type of script I'm talking about:

https://github.com/movalex/fusion_scripts/blob/master/Scripts/Tool/Macro2Group.lua

@sumneko sumneko added the question User has a question label Jun 13, 2019
@sumneko
Copy link
Collaborator

sumneko commented Jun 13, 2019

You may use EmmyLua for now.
image

@bryab
Copy link
Author

bryab commented Jun 19, 2019

Is there a recommended method of "including" such files in your VS Code workspace? Or must you just have your "defintion file" somewhere in your workspace?

@Avril112113
Copy link

Avril112113 commented Jun 20, 2019

What i have done is make a folder called api/ and then another folder named after what its defining
and then put lua files for there definitions

I created 2 python scripts to automate converting a webpage into bare lua files with Emmy's format for auto-completions ect

https://github.com/Dude112113/RobloxApi-Definitions-Emmy

just as a side note, this is what i have done, don't expect it to be how it should be done as that i do not know.

@bryab
Copy link
Author

bryab commented Jun 20, 2019

Yes, I've done much the same myself. Havent put it on github yet but intend to.

Have you somehow managed to get function descriptions to show up? I use a format like this:

--- Opens a filename for seeking and playback
function preview:Open()end

But in VSCode I don't see that comment "Opens a filename..." etc when i begin to type "Open", as I would in other languages.

@Avril112113
Copy link

Very good point, im currently using a different extension for the time being until this one has better support for EmmyLua...
i will create a suggestion for it.

@sumneko sumneko added the feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) label Jun 21, 2019
@sumneko
Copy link
Collaborator

sumneko commented Jun 24, 2019

image
I think this may meet your needs.

@bryab
Copy link
Author

bryab commented Jun 26, 2019

Wow, sounds great! Also, the English looks good to me...

@bryab bryab closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) question User has a question
Projects
None yet
Development

No branches or pull requests

3 participants