Skip to content

[Highlighting] Allow custom colors for package #SCL-25408#719

Open
Siupahc wants to merge 1 commit into
JetBrains:idea261.xfrom
Siupahc:features/pacakge-highlighting
Open

[Highlighting] Allow custom colors for package #SCL-25408#719
Siupahc wants to merge 1 commit into
JetBrains:idea261.xfrom
Siupahc:features/pacakge-highlighting

Conversation

@Siupahc
Copy link
Copy Markdown

@Siupahc Siupahc commented May 7, 2026

What does this PR do?

This PR introduces customizable syntax highlighting for package references in the Scala plugin. Previously, package names in import statements and fully qualified references lacked a dedicated semantic color setting.

Key Changes

  • Text Attribute Key: Added a new PACKAGE highlight info type and text attributes key, with a graceful fallback to the default identifier color to support all themes.
  • Semantic Analysis: Updated ScalaColorsSchemeUtils to detect resolved PsiPackage elements and assign them the new PACKAGE highlight type.
  • Color Settings UI: Exposed the new "Package" attribute in Settings > Editor > Color Scheme > Scala. The demo text to demonstrates package highlighting in action.
  • Testing: Added testPackageHighlighting to ScalaColorSchemeAnnotatorTest to verify that package sequences are correctly identified and colored during semantic analysis.

Related YouTrack Issue

Fixes #SCL-25408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant