Reputation: 2914
We got a Ruby API for our application and I'm trying to figure out if I can make an extension for VSCode that add auto-complete for our API to the Intellisense feature of the editor.
With RubyMine I've done this by simply using stubs packaged as a gem. Adding the gem to the RubyMine project is all that I needed to have the editor provide code insight that included our API.
How can this be done for VSCode? I was hoping to build upon the existing vscode-ruby extension for Code. But I'm only finding examples of adding language extensions.
Upvotes: 3
Views: 3884
Reputation: 2689
Thanks to questions like this I keep up to day with new technologies and tools.
I did a quick read of the documentation, although VSCode support several language the page refers to VS Code Marketplace for extensions, and ruby is one of them.
Now, ruby extension claims to have IntelliSense and autocomplete, however if this does not detects your API, then you may need to create your own language extension. I assume that if your Ruby is an API, as you said, then VSCode has not access to the interface in order to provide the possible predictions. Perhaps if you somehow could get the source code of the API VSCode would detect the interfaces, and life would be much easier.
Anyway, have a look to the extensionAPI7Language-support There explain how to create
both of then have to be manually configured.
Upvotes: 4