intellij-gdscript icon indicating copy to clipboard operation
intellij-gdscript copied to clipboard

Fix/Add new LSP support

Open atomicptr opened this issue 5 years ago • 9 comments

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)

atomicptr avatar Feb 18 '20 10:02 atomicptr

Thanks @atomicptr for a detailed description and links. It's definitely worth implementing.

I'll look into it after finishing #44 (WIP).

exigow avatar Feb 18 '20 12:02 exigow

https://github.com/godotengine/godot/pull/35864

exigow avatar Mar 14 '20 18:03 exigow

There is also https://github.com/gtache/intellij-lsp/ I don't know, which one is better.

van800 avatar Mar 14 '20 18:03 van800

I have working PoC on language-server branch. Works with Godot 3.2.1.

exigow avatar May 07 '20 10:05 exigow

Branch updated. :rocket::rocket::rocket: Peek 2020-05-12 23-11

exigow avatar May 12 '20 21:05 exigow

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.

exigow avatar May 20 '20 18:05 exigow

~~Oh, I've found a bug: settings are not remembered between IDE sessions.~~

EDIT: Fixed.

exigow avatar May 20 '20 18:05 exigow

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?

TapGhoul avatar Oct 18 '21 17:10 TapGhoul