-
Notifications
You must be signed in to change notification settings - Fork 66
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
IntelliJ example #999
Comments
Hi @ctron, Langium can be used by every editor that somehow supports the language server protocol (LSP). There's an LSP plugin available for IntelliJ that would allow to connect to a Langium based language server. Note that for IntelliJ in particular, the LSP is effectively a second-class citizen, since their "normal" languages are so tightly integrated into the IDE, which is just not feasible with the LSP alone. This is why we don't offer explicit support for IntelliJ as of now. In theory you could provide a more deeply integrated, specialized plugin for a Langium based language, but I'm not sure how one would go on about this. My knowledge about IntelliJ plugin development is fairly limited. Also note that JetBrains have their own DSL workbench specificially crafted towards their products called MPS. Maybe that fits better with your requirements. |
see also ballerina-platform/lsp4intellij#303 |
I have tried both the IntelliJ Marketplace Plugin https://plugins.jetbrains.com/plugin/10209-lsp-support and the IntelliJ Plugin dependency https://github.com/ballerina-platform/lsp4intellij. The Marketplace Plugin is actually working: Validations, Quick Fixes, Formatting, etc. With the lsp4intellij solution you need to setup you own IntelliJ extension project and integrate the Langium LSP server into it. It did not work for me, even though the project seems to be still alive. For me the IntelliJ LSP integration looks not really stable at the moment. |
Instead of IDEA, Jetbrains is coming out with Fleet soon which uses LSP, so support should be much easier for that product once it supports editor plugins. |
Please try https://github.com/redhat-developer/lsp4ij which is a free lsp support for intellij |
Fellows at zenstack were able to create the JetBrains extension:
|
In the meantime, JetBrains has started offering LSP support for their paid IDEs: https://blog.jetbrains.com/platform/2023/07/lsp-for-plugin-developers/ As I understand this, the solution is not available for the open source IntelliJ Platform. |
@spoenemann as I said please try https://github.com/redhat-developer/lsp4ij which is a free lsp support for intellij which has been released. If you want to try to integrate your language server without developping an IJ plugin please read https://github.com/redhat-developer/lsp4ij/blob/main/docs%2FUserDefinedLanguageServer.md If you want to try to integrate your language server by developping an IJ plugin please read https://github.com/redhat-developer/lsp4ij/blob/main/docs%2FDeveloperGuide.md If you want to know the LSP support please read https://github.com/redhat-developer/lsp4ij/blob/main/docs%2FLSPSupport.md |
@spoenemann just for your information, we did the 0.0.2 release of LSP4IJ and if you want to have an overview of LSP4IJ, please read Meet LSP4IJ, a new LSP Client for JetBrains-based IDEs article that we have published on friday. Hope you will like it. |
Nice! |
I've opened eclipse-langium/langium-website#243 to track documentation on this. I think we should continue the discussion there. I'm closing this issue. Thanks for the info about LSP4IJ, we'll surely include this on the website. |
On the homepage it is mentioned that Langium can be used for IntelliJ editors. However, I wasn't able to find any information on how this could be achieved.
I think it makes sense to provide an example project, or at least outline the steps necessary.
The text was updated successfully, but these errors were encountered: