izhangzhihao / intellij-rainbow-brackets

🌈Rainbow Brackets for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio/Fleet
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
GNU General Public License v3.0
4.46k stars 214 forks source link

[IJPL-162016] Semantic highlighting works incorrectly in Scala #2781

Closed migdeosan closed 3 weeks ago

migdeosan commented 1 month ago

Have you checked the issues and discussions to ensure there are no duplicates?

Yes

Are you using JetBrains Client / Code With Me / IntelliJ Remote Development?

No

Your programming languages

Scala

Free or paid?

Paid users

Expected Behavior

In the previous version the plugin works fine as in the image.

image

Current Behavior

But in the last version doesn't work as you can see in this image. image

Sometimes works for some variables but not for others and it doesn't have any sense.

Code snippet for reproduce

/**
  * Method for testing the rainbow bracket plugin
  * @param df DataFrame to test
  * @param spark Spark Session handler
  */
def testingRainbowBracket(df: DataFrame)(implicit spark: SparkSession): Unit = {
  val rainbowBracket = spark.table("db.tb")
  val rainbowBracketColumns = rainbowBracket.columns
  val rainbowBracketDF = df
    .join(rainbowBracket, df("product_code") === rainbowBracket("product_code"), "left_outer")
    .select(rainbowBracketColumns.map(col):_*)
  rainbowBracketDF.show(10)
}

Your Environment

IntelliJ IDEA 2024.2.2 (Community Edition)
Build #IC-242.22855.74, built on September 18, 2024
Runtime version: 21.0.3+13-b509.15 x86_64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.6.1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  Key Promoter X (2024.2.0)
  lermitage.intellij.extra.icons (2024.7.2)
  Lombook Plugin (242.22855.74)
  com.wakatime.intellij.plugin (15.0.3)
  gherkin (242.20224.159)
  net.seesharpsoft.intellij.plugins.csv (3.4.0-242)
  izhangzhihao.rainbow.brackets (2024.2.6-241)
  com.github.copilot (1.5.23.6819)
  zielu.gittoolbox (600.0.0+242)
  org.sonarlint.idea (10.9.0.79423)
  MavenRunHelper (4.28.0-IJ2022.2)
  org.intellij.scala (2024.2.25)
Kotlin: 242.22855.74-IJ
izhangzhihao commented 1 month ago
migdeosan commented 1 month ago
izhangzhihao commented 1 month ago

Did you mean sometimes it works but sometimes does not ?

I think that related to IJPL-162016 Semantic highlighting works incorrectly in Scala.

NOTE: rainbow variables for scala is reusing the same function build by the Scala plugin.

migdeosan commented 1 month ago

Hi, yes, it seems to be the same problem. But if I understood you correctly, there is no solution for this because it is an issue derived from the Scala plugin?

izhangzhihao commented 1 month ago

Yes, it depends on the Scala plugin.

migdeosan commented 1 month ago

Ok, thanks. Regards.

izhangzhihao commented 3 weeks ago

Fixed in the Scala plugin build: 2024.2.609 (Nightly) Fixed in the Scala plugin build: 2024.3.521 (Nightly)