bat
bat copied to clipboard
Syntax: [Log] scope whole line based on log level
Update the log syntax definition to allow color schemes to color entire lines differently based on log level. Addresses #2152
I was debating whether to put details of how to customise the color scheme in the changelog or readme, but seems too specific to belong in either place (its a shame Sublime doesn't support color scheme settings - "highlight_whole_log_line" would be a neat way to tackle this), so I'll likely drop a comment on the issue where it was requested. Not sure if worth mentioning this change in the changelog at all (as it won't affect anything without customization, unless we decide to change the scopes - I'm considering markup.error.line for example to cover the whole line instead of something like meta.log-level.error, and the fatal text could be markup.error.word or something, and color schemes can differentiate based on that)?
Nice! I fully trust your judgement on whether or not to mention this in CHANGELOG.md. Wouldn't it be good to also add a regression test though?
How do we proceed here? Merge without an additional test?
I think there's no way to add a regression test without updating one of the color schemes - this PR enables color schemes to color entire lines differently based on log level, but has no effect unless the color scheme targets the new scopes. So I'm thinking to merge without an additional test.
Thanks