diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index 6058bc3dc..cf6738764 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -38,7 +38,9 @@ tree-sitter-css = { version = "0.19" } tree-sitter-toml = { version = "0.20" } tree-sitter-c = { version = "0.20" } tree-sitter-python = { version = "0.20" } -tree-sitter-ruby = { version = "0.20" } +# 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-ruby = { version = "0.20", optional = true } tree-sitter-bash = { version = "0.20" } tree-sitter-go = { version = "0.20.0" } tree-sitter-md = { version = "0.1.5" } diff --git a/radicle-cli/src/terminal/highlight.rs b/radicle-cli/src/terminal/highlight.rs index a994d6042..6c86e66d6 100644 --- a/radicle-cli/src/terminal/highlight.rs +++ b/radicle-cli/src/terminal/highlight.rs @@ -285,6 +285,7 @@ impl Highlighter { ) .expect("Highlighter::config: highlight configuration must be valid") })), + #[cfg(feature = "tree-sitter-ruby")] "ruby" => Some(self.configs.entry(language).or_insert_with(|| { ts::HighlightConfiguration::new( tree_sitter_ruby::language(),