zowe / zowe-cobol-language-support-intellij

Zowe COBOL Language Support plug-in for IntelliJ IDEA
2 stars 1 forks source link

LSP server does not start on MacOS #2

Closed KUGDev closed 2 months ago

KUGDev commented 3 months ago

TextMate Bundle is loaded and works well, but the LSP server is not able to start

image

❯ java -version openjdk version "11.0.18" 2023-01-17 OpenJDK Runtime Environment GraalVM CE 22.3.1 (build 11.0.18+10-jvmci-22.3-b13) OpenJDK 64-Bit Server VM GraalVM CE 22.3.1 (build 11.0.18+10-jvmci-22.3-b13, mixed mode)

IntelliJ IDEA v2024.1

angelozerr commented 3 months ago

It seems that you are using ballerina lsp intellij support. Please try https://github.com/redhat-developer/lsp4ij

KUGDev commented 3 months ago

Hello @angelozerr Thanks for the advice By the time we implemented the plug-in, the LSP4IJ by RedHat was not so mature, so we decided to postpone the usage of it I will try to move to the proposed client and replace the solution if it works better!

angelozerr commented 3 months ago

By the time we implemented the plug-in, the LSP4IJ by RedHat was not so mature, so we decided to postpone the usage of it

Why are you saying that it is not mature? When have you try it? We use LSP4IJ in https://github.com/redhat-developer/intellij-quarkus with complex usecase (we delegate for instance codelens compute to the IJ java PsiJavaFile to visit Java file and collect method, etc) and it seems users seems happy https://plugins.jetbrains.com/plugin/13234-quarkus-tools/edit/reviews since may 2023 (see https://plugins.jetbrains.com/plugin/13234-quarkus-tools/reviews#review=87834)

As we have seen that LSP4IJ starts working well for Quarkus we decide to extract the LSP support in a new IJ plugin LSP4IJ.

I spend my time to play with other advanced language server like typescript, go, rust and we fixed a lot of bugs and we have now a lot of tests. See for instance test with TypeScript LS https://github.com/redhat-developer/lsp4ij/blob/main/src/test/java/com/redhat/devtools/lsp4ij/features/completion/TypeScriptCompletionTest.java

I suggest really that you take some times to read the LSP4IJ documentation at https://github.com/redhat-developer/lsp4ij/tree/main?tab=readme-ov-file#description

LSP4IJ provides an LSP console which is very helpfullto understand what it happens with the language server

image

I suggest that you try to integrate your LS without developping something with just a settings with your start command, see https://github.com/redhat-developer/lsp4ij/blob/main/docs/UserDefinedLanguageServer.md

If you wish to know what we are supporting, see https://github.com/redhat-developer/lsp4ij/blob/main/docs/LSPSupport.md

At the end if you want to integrate your LS with a plugin, please read https://github.com/redhat-developer/lsp4ij/blob/main/docs/DeveloperGuide.md

And if you find any issues, please report an issue at https://github.com/redhat-developer/lsp4ij/issues

Thanks!

KUGDev commented 3 months ago

@angelozerr thank you for the reply Sorry for calling your LSP4IJ solution immature, I used to compare things basing on the SemVer + the amount of time they are on the stage Now I see that you are really fighting for the LSP client to be used by us I tried to configure the usage of the LSP4IJ, got some errors at the start, but it seems to work (it wasn't clear what to set in the build.gradle.kts) As I said, I will try to use it in our plug-in, if it has all the capabilities we need and fixes the error, we will switch to it

angelozerr commented 3 months ago

Sorry for calling your LSP4IJ solution immature, I used to compare things basing on the SemVer + the amount of time they are on the stage

No problem I undestand that you can be afraid to adopt an lsp support which is young and have none integration except our intellij quarkus.

So please try it and dont hesitate to create any issues with your question or problems that you could have.

Thanks for your feedback !

angelozerr commented 1 month ago

@KUGDev it seems you have published your plugin based on LSP4IJ that's very cool. Congrats!

Could you please create a PR in LSP4IJ to add your plugin in the readme (who is using LSP4IJ ?)

And if you like LSP4IJ could you please add a review in marketplace to help us to promote LSP4IJ.

Thanks!

KUGDev commented 1 month ago

Hi @angelozerr Yes, sure, I will add the plug-in in the list

KUGDev commented 1 month ago

@angelozerr the PR is:https://github.com/redhat-developer/lsp4ij/pull/420