live-plugin icon indicating copy to clipboard operation
live-plugin copied to clipboard

plugin.kts file in hello-world no highlighting/autocomplete

Open optical002 opened this issue 9 months ago • 11 comments

LivePlugin - 0.9.5 beta IDEA - 2025.1

  1. Created an empty kotlin file, with idea build.
  2. Installed 'LivePlugins' plugin.
  3. Added hello-world for kotlin.
  4. Ran it seems to work, but autocomplete and highlighting does not work.

When I write 'import ' and press ctrl+space it list me all available imports and I noticed that it only shows from my jdk available imports nothing else.

Also pressed settings icon -> 'Add LivePlugin and IDE Jars to Project'. Nothing seems to work.

.groovey plugins seem to have highlighting working

Image

optical002 avatar May 04 '25 12:05 optical002

Thank you for reporting this!

Unfortunately, it looks like Kotlin script integration is broken in the latest IDE versions (most likely because of K2, something like BridgeScriptDefinitionsContributor in this file https://github.com/JetBrains/intellij-community/blob/1c2d792c1da847f434a9473d0f836a4a2cc0378c/plugins/kotlin/plugin/k2/resources/META-INF/scripting-k2.xml#L127).

I'm looking into it and will release a new version once I have it working (hopefully today or tomorrow).

dkandalov avatar May 04 '25 15:05 dkandalov

Hello. Is this fixed already? I have the same issue with version IntelliJ IDEA 2025.1.1.1 (Ultimate Edition

DasOhmoff avatar May 15 '25 17:05 DasOhmoff

@DasOhmoff Apologies for the slow fix. I think I have the plugin working locally for IntelliJ 2025.1 and 2025.2.

dkandalov avatar May 17 '25 01:05 dkandalov

Ok, thanks. So does that mean it will be merged soon into a new plugin version and that we can then update the plugin and this gets fixed?

DasOhmoff avatar May 17 '25 08:05 DasOhmoff

I uploaded version 0.9.6 with the fix for IntelliJ 2025.1 (but it doesn't work in 2025.2 EAP 🙄). It should be available once approved by JetBrains.

dkandalov avatar May 18 '25 10:05 dkandalov

In 0.9.6 it still doesn't regcognize the liveplugin module:

Image

AsafMah avatar May 22 '25 05:05 AsafMah

Yes, I have this issue as well unfortunately

DasOhmoff avatar May 26 '25 18:05 DasOhmoff

Apologies for the slow response.

It looks like LivePlugin highlighting works fine in IntelliJ 2025.2 EAP 🤷 Unfortunately, I don't really have the capacity to dig into what's wrong in 2025.1 and is tempted to just leave LivePlugin assuming 2025.2 is going to be released some time soon.

It also looks like notebooks will have some kind of integration with IDE so it will be possible to evaluate code in IDE similar to LivePlugin. I might wait to see how this works (it's possible this is why 2025.2 had some kotlin script fixes).

dkandalov avatar Jun 04 '25 17:06 dkandalov

Official 2025.2 released. I am trying to make it work on 2025.2 but I was not successful, does it wore on your computer?

DasOhmoff avatar Aug 17 '25 15:08 DasOhmoff

2025.2 did fix it for me

AsafMah avatar Aug 18 '25 03:08 AsafMah

Ah yes, you are right, it works now on my machine as well. I has to delete some non-existent imports. This can be closed if you guys are fine with it.

DasOhmoff avatar Aug 18 '25 08:08 DasOhmoff