AtomMaterialUI / color-highlighter

JetBrains plugin to preview colors directly from within the code.
MIT License
40 stars 23 forks source link

Reference to Kotlin variables, function arguments, and named parameters are always colored #100

Closed Him188 closed 1 year ago

Him188 commented 1 year ago

Describe the bug

References to function variables, function arguments, and named parameters are always colored.


fun Color(
    red: Float,
    green: Float,
    blue: Float,
    alpha: Float = 1f,
) {
    println("red = $red") // `$red` is colored
}

fun main() {
    Color(
        red = 1, // `red` is colored
    )
}

It does not make sense that the variables are colored.

Disabling 'Detect Color Properties' doesn't help.

To Reproduce

  1. Create a Kotlin project
  2. Paste the above code
  3. References are colored

Expected Behavior

References are not colored.

Environment

Screenshots

image

mallowigi commented 1 year ago

I don't have the time to improve this project. If you wish to help, be my guest.