Closed tolysz closed 9 years ago
That would be great!
Here is an idea for the configuration:
{
"default_color": "invalid",
"colors": [
{
"regex": ".* warning:.*",
"color": "sublimelinter.mark.error"
},
{
"regex": ".* error:.*",
"color": "sublimelinter.mark.error"
}
]
}
I saw you made a fork. Do you want to implement the feature?
Let me have a stab; it should be not very hard
This is the closes I could do; "warning"... keys are used to distinguish regions
{
"default_color":"invalid",
"colors":{
"warning":{
"regex": ".* warning:.*",
"color": "sublimelinter.mark.warning"
},
"error":{
"regex": ".* error:.*",
"color": "sublimelinter.mark.error"
}
}
}
Good idea.
But why don't you generate the name of the region?
Like build_errors_color0
, build_errors_color1
...
I think this would be simpler for the user.
done
Awesome! I'll have a look at it while I'm at home and then merge it.
I made a few changes.
First, there was an exception when the column was not provided by the file_regex.
Then, I changed the settings for something more intuitive:
{
// the plugin tests each regex and stops at the first match
"colors": [
{
"regex": "(warning|note)",
"scope": "sublimelinter.mark.warning"
},
{
// default color, when none of the above matches
"scope": "sublimelinter.mark.error"
}
]
}
Note that i simplified the regex and I renamed "color" into "scope" to make it clearer.
The code is pushed in branch tolysz-issue/9, please give it a try.
Feature available in version 1.3.0
Thank you :)
Hi, Can we have more colors with more types? Ideally user configurable ones!