Expand description
Parse a Visual Studio Code theme into a Syntect Theme.
§Usage
use syntect::highlighting::Theme;
use vscode_theme_syntect::VscodeTheme;
use std::str::FromStr;
let theme = VscodeTheme::from_str(include_str!("../assets/palenight.json")).expect("Failed to parse theme");
assert!(Theme::try_from(theme).is_ok());Alternatively, you can parse themes using the included utility functions:
Modules§
- error
- Errors for parsing Visual Studio Code themes
Structs§
- Token
Color - A token color
- Token
Settings - The settings of a token
- Vscode
Theme - A Visual Studio Code theme
Enums§
- Scope
- A scope of a token
Functions§
- parse_
vscode_ theme - Parse a Visual Studio Code theme from a string.
- parse_
vscode_ theme_ file - Parse a Visual Studio Code theme from a file.