Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow changing the number of colors #20

Open
arm32x opened this issue Apr 27, 2023 · 0 comments
Open

Allow changing the number of colors #20

arm32x opened this issue Apr 27, 2023 · 0 comments

Comments

@arm32x
Copy link

arm32x commented Apr 27, 2023

Currently, the plugin will use 10 colors to highlight columns. If there are more than 10 columns, it will repeat these 10 colors.

My color scheme only has 7 colors that would be reasonable to use here, so I would like to be able to change the number of colors in the repeating pattern to 7.

After looking at the code briefly, I think you might just be able to change the length of this array? Doing that at runtime would probably be more difficult, though.

public static final TextAttributesKey[] TEXT_ATTRIBUTES_KEYS =
new TextAttributesKey[] {
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_0"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_1"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_2"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_3"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_4"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_5"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_6"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_7"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_8"),
TextAttributesKey.createTextAttributesKey("RAINBOW_CSV_COLOR_9")
};

JenCrawford pushed a commit to JenCrawford/intellij-rainbow-csv that referenced this issue Jul 28, 2023
JenCrawford pushed a commit to JenCrawford/intellij-rainbow-csv that referenced this issue Jul 28, 2023
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

No branches or pull requests

1 participant