-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
typst.rs
34 lines (32 loc) 路 908 Bytes
/
typst.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
feature = "config-schema",
derive(schemars::JsonSchema),
schemars(deny_unknown_fields)
)]
#[serde(default)]
pub struct TypstConfig<'a> {
pub format: &'a str,
pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
pub detect_extensions: Vec<&'a str>,
pub detect_files: Vec<&'a str>,
pub detect_folders: Vec<&'a str>,
}
impl<'a> Default for TypstConfig<'a> {
fn default() -> Self {
TypstConfig {
format: "via [$symbol($version )]($style)",
version_format: "v${raw}",
symbol: "t ",
style: "bold #0093A7",
disabled: false,
detect_extensions: vec!["typ"],
detect_files: vec!["template.typ"],
detect_folders: vec![],
}
}
}