From 5d75d81b1ec70ff72b03c89bfae0fdcbc3db1380 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 17 Sep 2022 20:17:40 -0700 Subject: [PATCH] cargo fmt --- src/display/style.rs | 2 +- src/parse/tree_sitter_parser.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/display/style.rs b/src/display/style.rs index 4b60850f54..484b2e31ba 100644 --- a/src/display/style.rs +++ b/src/display/style.rs @@ -328,7 +328,7 @@ pub fn color_positions( if language.is_some() { style = style.underline(); } - + if syntax_highlight && matches!(highlight, TokenKind::Atom(AtomKind::Comment)) { style = style.italic(); } diff --git a/src/parse/tree_sitter_parser.rs b/src/parse/tree_sitter_parser.rs index a6f493c4c7..b700587bd6 100644 --- a/src/parse/tree_sitter_parser.rs +++ b/src/parse/tree_sitter_parser.rs @@ -332,7 +332,9 @@ pub fn from_language(language: guess::Language) -> TreeSitterConfig { let language = unsafe { tree_sitter_hare() }; TreeSitterConfig { language, - atom_nodes: vec!["string_constant", "rune_constant"].into_iter().collect(), + atom_nodes: vec!["string_constant", "rune_constant"] + .into_iter() + .collect(), delimiter_tokens: vec![("[", "]"), ("(", ")"), ("{", "}")], highlight_query: ts::Query::new( language,