fix: keep highlight names list consistent in the docs and cli
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
parent
9e1a2a701b
commit
07aaf2322e
3 changed files with 44 additions and 28 deletions
|
|
@ -158,28 +158,32 @@ impl Serialize for Theme {
|
|||
impl Default for Theme {
|
||||
fn default() -> Self {
|
||||
serde_json::from_value(json!({
|
||||
"attribute": {"color": 124, "italic": true},
|
||||
"comment": {"color": 245, "italic": true},
|
||||
"constant.builtin": {"color": 94, "bold": true},
|
||||
"constant": 94,
|
||||
"constructor": 136,
|
||||
"embedded": null,
|
||||
"function.builtin": {"color": 26, "bold": true},
|
||||
"function": 26,
|
||||
"keyword": 56,
|
||||
"number": {"color": 94, "bold": true},
|
||||
"module": 136,
|
||||
"property": 124,
|
||||
"operator": {"color": 239, "bold": true},
|
||||
"punctuation.bracket": 239,
|
||||
"punctuation.delimiter": 239,
|
||||
"string.special": 30,
|
||||
"string": 28,
|
||||
"tag": 18,
|
||||
"type": 23,
|
||||
"type.builtin": {"color": 23, "bold": true},
|
||||
"variable.builtin": {"bold": true},
|
||||
"variable.parameter": {"underline": true}
|
||||
"attribute": {"color": 124, "italic": true},
|
||||
"comment": {"color": 245, "italic": true},
|
||||
"constant": 94,
|
||||
"constant.builtin": {"color": 94, "bold": true},
|
||||
"constructor": 136,
|
||||
"embedded": null,
|
||||
"function": 26,
|
||||
"function.builtin": {"color": 26, "bold": true},
|
||||
"keyword": 56,
|
||||
"module": 136,
|
||||
"number": {"color": 94, "bold": true},
|
||||
"operator": {"color": 239, "bold": true},
|
||||
"property": 124,
|
||||
"property.builtin": {"color": 124, "bold": true},
|
||||
"punctuation": 239,
|
||||
"punctuation.bracket": 239,
|
||||
"punctuation.delimiter": 239,
|
||||
"punctuation.special": 239,
|
||||
"string": 28,
|
||||
"string.special": 30,
|
||||
"tag": 18,
|
||||
"type": 23,
|
||||
"type.builtin": {"color": 23, "bold": true},
|
||||
"variable": 252,
|
||||
"variable.builtin": {"color": 252, "bold": true},
|
||||
"variable.parameter": {"color": 252, "underline": true}
|
||||
}))
|
||||
.unwrap()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,25 +33,29 @@ lazy_static! {
|
|||
"carriage-return",
|
||||
"comment",
|
||||
"constant",
|
||||
"constant.builtin",
|
||||
"constructor",
|
||||
"function.builtin",
|
||||
"function",
|
||||
"embedded",
|
||||
"function",
|
||||
"function.builtin",
|
||||
"keyword",
|
||||
"module",
|
||||
"number",
|
||||
"operator",
|
||||
"property.builtin",
|
||||
"property",
|
||||
"property.builtin",
|
||||
"punctuation",
|
||||
"punctuation.bracket",
|
||||
"punctuation.delimiter",
|
||||
"punctuation.special",
|
||||
"string",
|
||||
"string.special",
|
||||
"tag",
|
||||
"type.builtin",
|
||||
"type",
|
||||
"type.builtin",
|
||||
"variable",
|
||||
"variable.builtin",
|
||||
"variable.parameter",
|
||||
"variable",
|
||||
]
|
||||
.iter()
|
||||
.copied()
|
||||
|
|
|
|||
|
|
@ -21,15 +21,23 @@ Define the list of highlight names that you will recognize:
|
|||
```rust
|
||||
let highlight_names = [
|
||||
"attribute",
|
||||
"comment",
|
||||
"constant",
|
||||
"function.builtin",
|
||||
"constant.builtin",
|
||||
"constructor",
|
||||
"embedded",
|
||||
"function",
|
||||
"function.builtin",
|
||||
"keyword",
|
||||
"module",
|
||||
"number",
|
||||
"operator",
|
||||
"property",
|
||||
"property.builtin",
|
||||
"punctuation",
|
||||
"punctuation.bracket",
|
||||
"punctuation.delimiter",
|
||||
"punctuation.special",
|
||||
"string",
|
||||
"string.special",
|
||||
"tag",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue