AtomMaterialUI / color-highlighter

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

Decimal numeric literals in Scala sources should not be highlighted #124

Closed OndrejSpanel closed 11 months ago

OndrejSpanel commented 11 months ago

Originally described in now closed #101:

I find the current highlighting a bit too much aggressive. In some cases it highlights things which are not colors at all.

Decimal numeric literals in Scala sources:

image

  val rng = new scala.util.Random(123456)
  val seeds = (0 until 10).map(_ => rng.nextInt(1000000))

I would like to have hex colors highlighted only when starting with 0x or #.

OndrejSpanel commented 11 months ago

Note: it seems when the option "Detect hex colors" is not enabled, plain numbers without 0x or # are not highlighted. Perhaps the option could be made more explicit, like "Detect hex color without prefix", or inverted as "Detect hex colors only when prefixed with 0x or #".

mallowigi commented 11 months ago

I don't plan on releasing an update just for wording. Closing this as this is irrelevant.