Skip to content
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

[FEATURE] Support LSP4IJ to be available on all IntelliJ-based IDEs #82

Open
antruongnguyen opened this issue Dec 3, 2024 · 4 comments

Comments

@antruongnguyen
Copy link

Description

Currently, the plugin is only available for the paid versions of IntelliJ IDEs. The reason is that the plugin uses the LSP API, which is only available in commercial IntelliJ IDEs. This is why the plugin does not work with the free variants (such as IntelliJ Community).

LSP4IJ is a free and open-source Language Server Protocol (LSP) client compatible with all flavors of IntelliJ. The LSP4IJ plugin is available here, and its source code is located here.

Suggested Solution

Please support LSP4IJ in order to replace IntelliJ LSP API

Source code: https://github.com/redhat-developer/lsp4ij

Alternatives

No response

Additional Context

No response

@manwithafox
Copy link
Contributor

@antruongnguyen Thank you for this hint. Actually in the past we had an (SAP internal) IJ plugin based on another LSP client lib. But that had a pretty clumsy integration. Far away from production quality.

The current approach gives us more trust as IJ itself provides the client side integration. Though, as you spotted, they do not support community editions, AND, while continuously improving, still lack many feature.

Taking a look into the source of LSP4IJ shows that they already have very broad request support and they are pacing fast - just a year since initial release.

I did a short manual configuration to try it out:

In Settings->Languages&Frameworks->Language Servers I created a new entry CDS with command node /path/to/@sap/cds-lsp/dist/main.js --stdio.
In the Mappings tab added an entry for file pattern *.cds with lang id cds, left Configuration tab empty.
Et voilà. It works already pretty nicely. Though there are some quirks we need to investigate.

E.g.

  • Alt-F7 Find Usages is not supported, but a proprietary GoTo->LSP references with special dialog.
  • Command-Hover highlights the wrong scope.
  • ... to be extended

@angelozerr
Copy link

Alt-F7 Find Usages is not supported, but a proprietary GoTo->LSP references with special dialog.

@antruongnguyen please note that LSP4IJ have a luck to have the contributor @SCWells72 which is working hard to have standard IDE actions like redhat-developer/lsp4ij#637

Command-Hover highlights the wrong scope.

Could you create an issue with a detailed info please.

... to be extended

Don'thesitate to create any issues.

@angelozerr
Copy link

@antruongnguyen Thank you for this hint. Actually in the past we had an (SAP internal) IJ plugin based on another LSP client lib. But that had a pretty clumsy integration. Far away from production quality.

The current approach gives us more trust as IJ itself provides the client side integration. Though, as you spotted, they do not support community editions, AND, while continuously improving, still lack many feature.

Taking a look into the source of LSP4IJ shows that they already have very broad request support and they are pacing fast - just a year since initial release.

I did a short manual configuration to try it out:

Please note that you can import / export the configuration that you have explained below. See https://github.com/redhat-developer/lsp4ij/blob/main/docs/UserDefinedLanguageServer.md#custom-template

In Settings->Languages&Frameworks->Language Servers I created a new entry CDS with command node /path/to/@sap/cds-lsp/dist/main.js --stdio.
In the Mappings tab added an entry for file pattern *.cds with lang id cds, left Configuration tab empty.
Et voilà. It works already pretty nicely. Though there are some quirks we need to investigate.

E.g.

  • Alt-F7 Find Usages is not supported, but a proprietary GoTo->LSP references with special dialog.
  • Command-Hover highlights the wrong scope.
  • ... to be extended

@rjayasinghe
Copy link

It would be pretty neat (especially cost-wise) if we had this plugin available for IntelliJ CE, too. The CDS support is actually the main reason why I got the paid Ultimate version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants