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

Add colorize.browser_color_names setting, reload config when changed #138

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rbolsius
Copy link
Contributor

There are two features included with this PR.

  1. colorize.browser_color_names setting to turn off colorization of browser color names (default is true, meaning color names are colorized by default)
  2. reload configuration changes automatically without having to restart (applies to all config settings except colorize.activate_variables_support_beta)

Also included is a minor bug fix in CacheManager to avoid initializing _decorationsCache twice.

@KamiKillertO
Copy link
Owner

Thanks for the PR I really appreciate 😃. Configuration reload was something I really wanted to add, thanks for adding it 👍 .

I'm not sure about the setting to turn off colorization for browser color names. The main idea of my extension it's to help visualize colors in code files. I think adding a setting which prevent colorization contradicts this idea.

I also have a question for you, did you have any difficulty to read/understand the code?

@rbolsius
Copy link
Contributor Author

rbolsius commented Apr 25, 2018 via email

@KamiKillertO
Copy link
Owner

Ok I see your point ^^.
🤔maybe a good solution could be to add a settings which permit to activate/deactivate colors decorations per language or file extensions.

Maybe something like :

"colorsColorization": {
  "*": [ "rgb", "hexa", "hsl", "browser", "variables"],
  "mardown": ["rgb", "hsl", "hexa"],
  // ".md": ["rgb", "hsl", "hexa"] // alternative
}

I need to think about it, I suggest you to create an issue for this and update your PR to remove everything about colorize.browser_color_names.

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.

2 participants