Extend UserSyntax to allow font_style and font_weight to be specified
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
parent
978cff8095
commit
ff053890cf
11 changed files with 111 additions and 15 deletions
|
@ -8,7 +8,7 @@ use serde::Deserialize;
|
|||
use theme::UserHighlightStyle;
|
||||
|
||||
use crate::util::Traverse;
|
||||
use crate::vscode::try_parse_color;
|
||||
use crate::vscode::{try_parse_color, try_parse_font_style, try_parse_font_weight};
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
|
@ -52,6 +52,16 @@ impl VsCodeTokenColor {
|
|||
.foreground
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
font_style: self
|
||||
.settings
|
||||
.font_style
|
||||
.as_ref()
|
||||
.and_then(|style| try_parse_font_style(&style)),
|
||||
font_weight: self
|
||||
.settings
|
||||
.font_style
|
||||
.as_ref()
|
||||
.and_then(|style| try_parse_font_weight(&style)),
|
||||
};
|
||||
|
||||
if highlight_style.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue