AndCake / micro-plugin-lsp

An LSP Client implementation for the Micro Editor
MIT License
182 stars 19 forks source link

How to use micro-plugin-lsp for Java #57

Open Zoxouu opened 8 months ago

Zoxouu commented 8 months ago

Hi I would like to use the plugin to program in Java and make my life easier except that I don't see Java in the programming languages ​​to test, do you know if I can use it with Java if so how?

AndCake commented 8 months ago

Hi Zoxouu,

You can try setting it up using the https://github.com/eclipse-jdtls/eclipse.jdt.ls package. On first look it seems like it would be fully supported but since it didn't test it with this plugin yet, I don't know.

Once you installed that language server, you should be able to open micro, press CTRL+E and then type "lsp.server=java=" (without the quotes) and paste the start command right behind the typed text from the above repo after updating the paths to point where you downloaded it to.

Let me know how it goes...

Zoxouu commented 8 months ago

Hi, so for errors it works but for imports it doesn't work sniff :

Gif

Do you have a solution for this?

AndCake commented 8 months ago

It looks to me like you are trying to Auto-Import items. Sadly, this particular functionality has not yet been implemented in this plugin. But the fact that you get error messages / diagnostics points to the plugin being at least partially compatible to that language server, which I guess is nice.

If you have the inclination to make a more complete example that is a little more complete and has imported the relevant packages, does auto completion / definitions / references work as well for you?