-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Autocompletion Service Support for external text editors #2245
Comments
is there any kind of standard on this? On Thu, Jul 9, 2015 at 9:32 AM, Saggi Mizrahi notifications@github.com
|
Not that I am aware of. That is why I suggested implementing the server side only and letting the community contribute the plugins. They all generally look like: {
display_text: string
completion_value: string
type: enum(function, variable, etc....)
} sublime api |
This comment has been minimized.
This comment has been minimized.
Yeah i guess this would probably be not that difficult to implement
|
This comment has been minimized.
This comment has been minimized.
I'd like to see this. Would be up for helping to create it. Is there somewhere we can keep track of this besides here? The issues on this repo are getting out of hand as there is so many open. |
I would be glad to help too, but would like some direction about how the Godot developers think it should be implemented. I would love to have this for my editor. |
Sounds like a useful feature. It should probably be tracked in a task on OpenProject @reduz. |
I made a module for this. You can find it here: https://github.com/neikeq/gd-autocomplete-service |
If we intend to add something like this to this repository, the main problem I faced was extracting parts of the code that was required for code completion from TextEditor, ScriptTextEditor and other places (can't remember), to put them in a single class that would provide these suggestions. This was the result: https://github.com/neikeq/gd-autocomplete-service/blob/master/autocomplete_service/code_completion_service.cpp |
I would actually make it part of the engine... the script API already contains abstract functions for this, but you likely need to add this code in the script text editorfor better context. |
What's the status on this? Isn't this something that was already implemented, or do I misunderstand it? |
This is already done as a module, but @reduz mentioned above that he would prefer it to be part of the engine. If that's going to happen, it would need some refactoring (I could try doing it) since as shown in this source file I had to duplicate code from different parts that were not exposed for this kind of usage or that were hard coded in classes like TextEdit. |
This comment has been minimized.
This comment has been minimized.
👍 This would be a huge advancement for workflows using neovim or vim. Or Atom, even, if you're into that. |
Just wanted to give a signal boost and to say that since this was submitted Microsoft came out with the Language Server Protocol to solve this exact problem. |
A completer for ycm would be really great. Currently there are clients for the following editors:
With neikeq module already existing, this looks like a low hanging fruit. |
It sounds like integrating this into the engine might give anyone that adds their own language through GDNative the ability to additionally add their own completion support, instead of it just being for GDScript. Which would be a huge win! |
Just wanting to add that LSP (Language Server Protocol) is become a more widely adopted standard now and that it is probably the best way forward for this. Atom recently announced Atom IDE which is built around LSP and GNOME Builder have had integrations built around it for a year or so. |
Great! We've been talking about YCM a lot but that's just an implementation detail. Supporting any thing like LSP or YCM will be a very big milestone for external editor workflows. |
Microsoft also have the debugger adapter protocol for VSCode (also what Atom plans to use) which is the debugger equivalent of LSP. Link to repo: https://github.com/Microsoft/vscode-debugadapter-node |
Dead? 😕 |
Bump. I don't mind using the built in editor but a LSP server would be a game changer. |
This would be a huge win for Godot, IMO. I appreciate the effort put into the built-in editor but I'd rather use the editors I work with on a daily basis. An LSP would help in enabling that type of workflow. I'd be happy to help contribute to this effort! |
Seems that there is a GSOC project that will bring LSP support to Godot. https://summerofcode.withgoogle.com/organizations/6553848640962560/#6258227275104256 Some very preliminary extension for VSCode it is online: https://marketplace.visualstudio.com/items?itemName=AnkitPriyarup.gdscript-lsp-extension#overview |
I can try implementing this, sounds relatively simple |
Are there any developments? I've tried to add @neikeq module's to godot 3.1.2 but i've run into an unrecognised type while building |
Fixed by #29780. |
Allow for external editor to connect to a specific port for GDScript code completion.
for instance, when the editor is on an editor plugin could send a request in the form of:
http://localhost:9999/auto_complete?postions=position with the buffer as the post buffer.
In return get a json list of available completions from the internal analyzer.
This will allow the use of external editors without having to explicitly support them.
It could even be implemented in a simpler manner with sockets and a bi-directional json steam
The text was updated successfully, but these errors were encountered: