mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
Add diff syntax highlighting
This commit is contained in:
Generated
+11
@@ -4105,6 +4105,7 @@ dependencies = [
|
||||
"tree-sitter-bash",
|
||||
"tree-sitter-c",
|
||||
"tree-sitter-css",
|
||||
"tree-sitter-diff",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-highlight",
|
||||
"tree-sitter-html",
|
||||
@@ -6138,6 +6139,16 @@ dependencies = [
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-diff"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfe1e5ca280a65dfe5ba4205c1bcc84edf486464fed315db53dee6da9a335889"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-go"
|
||||
version = "0.23.4"
|
||||
|
||||
@@ -24,6 +24,7 @@ thiserror = { version = "2.0.12" }
|
||||
tree-sitter-bash = { version = "0.23.3" }
|
||||
tree-sitter-c = { version = "0.23.2" }
|
||||
tree-sitter-css = { version = "0.23.1" }
|
||||
tree-sitter-diff = { version = "0.1.0" }
|
||||
tree-sitter-go = { version = "0.23.4" }
|
||||
tree-sitter-highlight = { version = "0.25.3" }
|
||||
tree-sitter-html = { version = "0.23.2" }
|
||||
|
||||
@@ -250,6 +250,7 @@ impl Highlighter {
|
||||
("rust", Self::config("rust")),
|
||||
("json", Self::config("json")),
|
||||
("jsdoc", Self::config("jsdoc")),
|
||||
("diff", Self::config("diff")),
|
||||
("typescript", Self::config("typescript")),
|
||||
("javascript", Self::config("javascript")),
|
||||
("markdown", Self::config("markdown")),
|
||||
@@ -337,6 +338,16 @@ impl Highlighter {
|
||||
)
|
||||
.expect("Highlighter::config: highlight configuration must be valid"),
|
||||
),
|
||||
"diff" => Some(
|
||||
ts::HighlightConfiguration::new(
|
||||
tree_sitter_diff::LANGUAGE.into(),
|
||||
language,
|
||||
tree_sitter_diff::HIGHLIGHTS_QUERY,
|
||||
"",
|
||||
"",
|
||||
)
|
||||
.expect("Highlighter::config: highlight configuration must be valid"),
|
||||
),
|
||||
"json" => Some(
|
||||
ts::HighlightConfiguration::new(
|
||||
tree_sitter_json::LANGUAGE.into(),
|
||||
|
||||
Reference in New Issue
Block a user