0 votes

I'm using Godot with an external editor (vim), however every time I need to see a built-in function or class I have to search the online documentation. It would also be nice if autocomplete worked for such cases.

I'm thinking of making a converter that extracts from .rst files from the documentation to .gd files. Hence the .gd files would have only dummy classes and functions (Like some IDE helpers out there). And then I could use ctags to generate the index.

Before doing this, I come here to know the opinion of the community on the subject.
If you had something more structured to work with, the conversion would be easier.

Thanks for listening.

EDIT 1:
Yesterday when I was looking at the project repository I found an xml.
https://github.com/godotengine/godot/blob/master/doc/base/classes.xml

I did some quick tests and managed to generate some gdscripts :D
https://www.dropbox.com/s/xrq3ynv23gvwkg3/gdscripts.zip?dl=0

EDIT 2:
GDScript generator
https://github.com/emersonmx/godot-ide-helper

(Powered by google translator :D)

in Engine by (12 points)
edited by

1 Answer

+1 vote

There has been discussion about ways to support this: Autocompletion Service Support for external text editors, although I'm not aware of anyone working on it currently.

Any solution to this is going to need to be tied directly into the engine. No offense, but your suggestion to use the .rst files is a bad one. First of all, the API docs are all autogenerated anyway, so it would be an unnecessary step - you should pull directly from the source. Secondly, any changes to the .rst formatting would break your tool, so it would be a huge pain to manage.

See here for how the documentation is generated/organized: Contributing to the documentation

Personally, I think integrating the Language Server Protocol or something similar is really going to be the best solution. It will be flexible and support a variety of editors. If you are able to contribute to that, I think it would be the best use of your time.

by (21,313 points)

The GDNative API generator could be used as API data source, but that would still mean the external editor would need to rewrite all the completion logic.

Yes using the .rst is really a bad idea, but it was what I had seen so far.

Yesterday when I was looking at the project repository I found an xml.
https://github.com/godotengine/godot/blob/master/doc/base/classes.xml

I did some quick tests and managed to generate some gdscripts :D

I'll take a look at this autocomplete server.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.