exigow/intellij-gdscript

LSP is not working

Closed this issue · 9 comments

I've spent so many hours on this, and I just cannot get anything working. I built the plugin from source, made sure it has the latest docs api folder, but after installing the option never shows up to use the folder i put in. And even after connecting lsp in godot, auto complete has never worked for any of my variables.

Can you please make a video showing how to set this up, I really want to be able to use it but it seems like nothing works.

Hi @SaranSundar,

sorry for the late reply. Looks like a path to new file must be explicitly added in code. I have updated instructions.

Unfortunately, there is no simple solution for auto detection of all available API's because after building the JAR all directories flattened. AFAIK this is a common issue.

Hello,

Thanks for the update I will try it out this evening. I love jet brains so much I judt want it to work like how the plug in for vs code works. There also just using the LSP and they have full auto complete and documentation support. If I could grt that vs code level working in pychsrm or intellij that would be amazing.

Thanks @SaranSundar.

Update should now be now publicly available and includes the latest API.

About your questions related to LSP:

The LSP client may not work because the server is actively developed and a lot of things differ between Godot versions. This is the main reason why the client was marked as experimental and it's turned off by default.

I'm now dealing with other topics but If you want you can try to fix mentioned issues - the LSP hasn't been touched for a while and I suspect the API is more stable now. This plugin uses Eclipse LSP but if you want you can use different tool.

If everything is OK please mark the issue as closed.

How hard would it be you think if I were to look at the vs code plug in and copy how they did the LSP. Would it differ a lot for intellij?

Also im confused on the expected functionality of this plug-in. So if it doesn't use the LSP by default, what should I expect to happen as I type code. Will it auto complete based on variables across the file, will it know the methods each object type has, or what should I be looking for when I test. Haven't had a chance to run it again yet hopefully I will today.

LSP was originally created by Microsoft for VSCode iirc. It's an open standard that has been widely adopted. I would be surprised if the implementation for JetBrains was any more similar than some high level concepts that overlap.

JetBrains has defined quite a robust set of API's for plugin development. Looking at the VSCode plugin would probably help a bit; but the real learning curve would most likely be figuring out how to make it all work within the scope of the JetBrains tooling.

Hi @SaranSundar,

To sum up:

I don't plan on addressing this at the moment because I'm working on adding GDScript 2.0 support (annotations, lambdas etc.) with correct indent lexing. As far as I know the VSCode plugin has a mature LSP implementation: https://github.com/godotengine/godot-vscode-plugin/tree/master/src/lsp

This might be a good start. LSP issue is available here: #43

I hope I answered your questions correctly. Let me know if you have more questions.

I decided to remove LSP support in latest commit (6d3ca27) because the presence of this feature is misleading (I received constructive feedback on this).

Discussion about LSP future/progress will be continued here: #43