intellij-gdscript
intellij-gdscript copied to clipboard
Fix/Add new LSP support
With Godot 3.2 (https://github.com/godotengine/godot/pull/29780) the engine added support for the language server protocol, it would make a lot of sense to use that for things like auto completition, goto definition, documentation ( related to #41 ), which will be pulled from the engine directly instead of relying on static files within the plugin.
Sadly there isn't much documentation on how this is exactly done within Godot, though several other editor plugins already support this for instance the official VS Code one https://github.com/godotengine/godot-vscode-plugin/tree/master/src/lsp
Other links that might be interesting:
- https://langserver.org/
- https://github.com/ballerina-platform/lsp4intellij (A LSP library for IntelliJ)
Thanks @atomicptr for a detailed description and links. It's definitely worth implementing.
I'll look into it after finishing #44 (WIP).
https://github.com/godotengine/godot/pull/35864
There is also https://github.com/gtache/intellij-lsp/ I don't know, which one is better.
I have working PoC on language-server
branch. Works with Godot 3.2.1.
Branch updated. :rocket::rocket::rocket:
Branch merged with master. Currently only two features are supported: diagnostics and completion. Not much, but it is a good starting point for further changes / polishing. I did not want to sit on a branch other than the master because the list of changes was constantly growing.
LSP features are disabled by default. Option is available in Settings/Languages & Frameworks/GDScript
.
~~Oh, I've found a bug: settings are not remembered between IDE sessions.~~
EDIT: Fixed.
I see in 6d3ca27a9c1bcf1216df8f35dc1ae5c8b652228f LSP was removed. Are you planning to go for built-in resolution similar to how intellij-rust does, or just forgoing the project-based hinting entirely? Is there any roadmap/tentative plan around LSP or related functionality at this stage?