| |
"rust" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_rust::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_rust::HIGHLIGHTS_QUERY,
|
| |
tree_sitter_rust::INJECTIONS_QUERY,
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"json" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_json::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_json::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"typescript" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_typescript::LANGUAGE_TYPESCRIPT.into(),
|
| + |
language,
|
| |
tree_sitter_typescript::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
tree_sitter_typescript::LOCALS_QUERY,
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"markdown" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_md::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_md::HIGHLIGHT_QUERY_BLOCK,
|
| |
tree_sitter_md::INJECTION_QUERY_BLOCK,
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"css" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_css::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_css::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"go" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_go::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_go::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"shell" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_bash::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_bash::HIGHLIGHT_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"c" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_c::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_c::HIGHLIGHT_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"python" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_python::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_python::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"ruby" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_ruby::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_ruby::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
tree_sitter_ruby::LOCALS_QUERY,
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"tsx" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_typescript::LANGUAGE_TSX.into(),
|
| + |
language,
|
| |
tree_sitter_typescript::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
tree_sitter_typescript::LOCALS_QUERY,
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"html" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_html::LANGUAGE.into(),
|
| + |
language,
|
| |
tree_sitter_html::HIGHLIGHTS_QUERY,
|
| |
tree_sitter_html::INJECTIONS_QUERY,
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|
| |
"toml" => Some(self.configs.entry(language).or_insert_with(|| {
|
| |
ts::HighlightConfiguration::new(
|
| |
tree_sitter_toml_ng::language(),
|
| + |
language,
|
| |
tree_sitter_toml_ng::HIGHLIGHTS_QUERY,
|
| |
"",
|
| |
"",
|
| - |
"",
|
| |
)
|
| |
.expect("Highlighter::config: highlight configuration must be valid")
|
| |
})),
|