fix(cli): fix theme key loading from config.json, closes #1232
This commit is contained in:
parent
ad30779d90
commit
bc94c0cc2f
2 changed files with 3 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ use std::{env, fs};
|
|||
/// This type holds the generic JSON content of the configuration file. Individual tree-sitter
|
||||
/// components will use the [`get`][] method to parse that JSON to extract configuration fields
|
||||
/// that are specific to that component.
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
pub location: PathBuf,
|
||||
pub config: Value,
|
||||
|
|
|
|||
|
|
@ -418,11 +418,10 @@ fn run() -> Result<()> {
|
|||
|
||||
if let Some(highlight_config) = language_config.highlight_config(language)? {
|
||||
let source = fs::read(path)?;
|
||||
let theme_config = config.get()?;
|
||||
if html_mode {
|
||||
highlight::html(
|
||||
&loader,
|
||||
&theme_config,
|
||||
&theme_config.theme,
|
||||
&source,
|
||||
highlight_config,
|
||||
quiet,
|
||||
|
|
@ -431,7 +430,7 @@ fn run() -> Result<()> {
|
|||
} else {
|
||||
highlight::ansi(
|
||||
&loader,
|
||||
&theme_config,
|
||||
&theme_config.theme,
|
||||
&source,
|
||||
highlight_config,
|
||||
time,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue