VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
540 stars 128 forks source link

Spike on the possibility to redirect go-to-source action in IDEA IntelliJ #946

Open Gedochao opened 2 years ago

Gedochao commented 2 years ago

image

When referring to a method from a *.sc script, ctrl-clicking on the method sends the user to the Scala CLI generated wrapper rather than the actual script file. We should investigate if we can override this behaviour somehow.

Gedochao commented 2 years ago

It doesn't seem to me that there's any way we can fix this on Scala CLI side. The way it works in IntelliJ atm seems to rely on intellij-scala logic for scripts rather than anything we deliver through BSP. If we want this to work properly in IntelliJ, we should probably dig deeper in intellij-scala code and try contributing, somewhat similar to how we're approaching it in Metals.

Unassigning myself from this, but leaving it open for now if anyone wants to have another look.