forked from mirrors/jj
Update schema for [colors] to allow either string or table values
This commit is contained in:
parent
259314b442
commit
16d287340a
1 changed files with 64 additions and 18 deletions
|
@ -99,25 +99,71 @@
|
||||||
},
|
},
|
||||||
"colors": {
|
"colors": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Mapping from jj formatter labels to color names",
|
"description": "Mapping from jj formatter labels to colors",
|
||||||
|
"definitions": {
|
||||||
|
"colors": {
|
||||||
|
"enum": [
|
||||||
|
"black",
|
||||||
|
"red",
|
||||||
|
"green",
|
||||||
|
"yellow",
|
||||||
|
"blue",
|
||||||
|
"magenta",
|
||||||
|
"cyan",
|
||||||
|
"white",
|
||||||
|
"bright black",
|
||||||
|
"bright red",
|
||||||
|
"bright green",
|
||||||
|
"bright yellow",
|
||||||
|
"bright blue",
|
||||||
|
"bright magenta",
|
||||||
|
"bright cyan",
|
||||||
|
"bright white"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"basicFormatterLabels": {
|
||||||
|
"enum": [
|
||||||
|
"description",
|
||||||
|
"change_id",
|
||||||
|
"commit_id",
|
||||||
|
"author",
|
||||||
|
"committer",
|
||||||
|
"working_copies",
|
||||||
|
"current_working_copy",
|
||||||
|
"branches",
|
||||||
|
"tags",
|
||||||
|
"git_refs",
|
||||||
|
"is_git_head",
|
||||||
|
"divergent",
|
||||||
|
"conflict"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"propertyNames": {
|
||||||
|
"oneOf": [
|
||||||
|
{ "$ref": "#/properties/colors/definitions/basicFormatterLabels" },
|
||||||
|
{ "type": "string" }
|
||||||
|
]
|
||||||
|
},
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"enum": [
|
"description": "A color profile for the given formatter label. Either a bare color name used as the foreground color or a table describing color and formatting",
|
||||||
"black",
|
"oneOf": [
|
||||||
"red",
|
{
|
||||||
"green",
|
"$ref": "#/properties/colors/definitions/colors"
|
||||||
"yellow",
|
},
|
||||||
"blue",
|
{
|
||||||
"magenta",
|
"type": "object",
|
||||||
"cyan",
|
"properties": {
|
||||||
"white",
|
"fg": { "$ref": "#/properties/colors/definitions/colors" },
|
||||||
"bright black",
|
"bg": { "$ref": "#/properties/colors/definitions/colors" },
|
||||||
"bright red",
|
"bold": {
|
||||||
"bright green",
|
"type": "boolean"
|
||||||
"bright yellow",
|
},
|
||||||
"bright blue",
|
"underline": {
|
||||||
"bright magenta",
|
"type": "boolean"
|
||||||
"bright cyan",
|
}
|
||||||
"bright white"
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue