From 2011f2b06e7207498aa084a25583c3c96c782c2d Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 3 Oct 2023 13:33:10 +0200 Subject: [PATCH] cli: Disable `html` highlighting by default See code comment for reasoning. This is fixed in v0.20.0 which is not out yet. --- radicle-cli/Cargo.toml | 4 +++- radicle-cli/src/terminal/highlight.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index cf673876..30cf7af4 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -33,7 +33,9 @@ tree-sitter = { version = "0.20.0" } tree-sitter-highlight = { version = "0.20" } tree-sitter-rust = { version = "0.20" } tree-sitter-typescript = { version = "0.20" } -tree-sitter-html = { version = "0.19" } +# N.b. This crate has a C++ token scanner that causes problems when building +# for the musl target. Hence it is optional for now. +tree-sitter-html = { version = "0.19", optional = true } tree-sitter-css = { version = "0.19" } tree-sitter-toml = { version = "0.20" } tree-sitter-c = { version = "0.20" } diff --git a/radicle-cli/src/terminal/highlight.rs b/radicle-cli/src/terminal/highlight.rs index 6c86e66d..2184a055 100644 --- a/radicle-cli/src/terminal/highlight.rs +++ b/radicle-cli/src/terminal/highlight.rs @@ -304,6 +304,7 @@ impl Highlighter { ) .expect("Highlighter::config: highlight configuration must be valid") })), + #[cfg(feature = "tree-sitter-html")] "html" => Some(self.configs.entry(language).or_insert_with(|| { ts::HighlightConfiguration::new( tree_sitter_html::language(),