fix(highlight): increase syntax highlighter config priority #424
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR increases the
highlighter
config priority over thergb_colors
config. It resolves #337.Currently, enabling the
syntect-highlighter
feature is not enough to actually enable syntax highlighting, because the defaultrgb_colors
config disallows it (more info and current workarounds in #337). It would be desirable if users could use syntax highlighting simply by adding thesyntect-highlighter
feature.Also, the current behavior is not consistent. For instance, when a custom highlighter is set (instead of syntect's),
rgb_colors
is already disregarded. When a custom highlighter is set andsyntect-highlighter
is disabled, even thecolor
config is disregarded (it shouldn't be).I kept 2 commits that may or may not be reviewed separately:
I did this so the change in behavior is explicit in the diff between the commits, by observing how the tests were changed. By the way, this is a breaking change since default behavior is changed.