Upgrade tree sitter and all grammars (#17734)
Fixes https://github.com/zed-industries/zed/issues/5291 Release Notes: - Fixed a bug where the 'toggle comments' command didn't use the right comment syntax in JSX and TSX elements. --------- Co-authored-by: Conrad <conrad@zed.dev> Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
parent
b54b3d6246
commit
bc5ed1334f
41 changed files with 366 additions and 387 deletions
|
@ -79,7 +79,7 @@ fn test_select_language(cx: &mut AppContext) {
|
|||
},
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_rust::language()),
|
||||
Some(tree_sitter_rust::LANGUAGE.into()),
|
||||
)));
|
||||
registry.add(Arc::new(Language::new(
|
||||
LanguageConfig {
|
||||
|
@ -90,7 +90,7 @@ fn test_select_language(cx: &mut AppContext) {
|
|||
},
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_rust::language()),
|
||||
Some(tree_sitter_rust::LANGUAGE.into()),
|
||||
)));
|
||||
|
||||
// matching file extension
|
||||
|
@ -1671,7 +1671,7 @@ fn test_autoindent_language_without_indents_query(cx: &mut AppContext) {
|
|||
auto_indent_using_last_non_empty_line: false,
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_json::language()),
|
||||
Some(tree_sitter_json::LANGUAGE.into()),
|
||||
)),
|
||||
cx,
|
||||
);
|
||||
|
@ -1999,7 +1999,7 @@ fn test_language_scope_at_with_javascript(cx: &mut AppContext) {
|
|||
.collect(),
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_typescript::language_tsx()),
|
||||
Some(tree_sitter_typescript::LANGUAGE_TSX.into()),
|
||||
)
|
||||
.with_override_query(
|
||||
r#"
|
||||
|
@ -2121,7 +2121,7 @@ fn test_language_scope_at_with_rust(cx: &mut AppContext) {
|
|||
},
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_rust::language()),
|
||||
Some(tree_sitter_rust::LANGUAGE.into()),
|
||||
)
|
||||
.with_override_query(
|
||||
r#"
|
||||
|
@ -2731,7 +2731,7 @@ fn ruby_lang() -> Language {
|
|||
line_comments: vec!["# ".into()],
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_ruby::language()),
|
||||
Some(tree_sitter_ruby::LANGUAGE.into()),
|
||||
)
|
||||
.with_indents_query(
|
||||
r#"
|
||||
|
@ -2782,7 +2782,7 @@ fn erb_lang() -> Language {
|
|||
block_comment: Some(("<%#".into(), "%>".into())),
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_embedded_template::language()),
|
||||
Some(tree_sitter_embedded_template::LANGUAGE.into()),
|
||||
)
|
||||
.with_injection_query(
|
||||
r#"
|
||||
|
@ -2812,7 +2812,7 @@ fn rust_lang() -> Language {
|
|||
},
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_rust::language()),
|
||||
Some(tree_sitter_rust::LANGUAGE.into()),
|
||||
)
|
||||
.with_indents_query(
|
||||
r#"
|
||||
|
@ -2870,7 +2870,7 @@ fn json_lang() -> Language {
|
|||
},
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_json::language()),
|
||||
Some(tree_sitter_json::LANGUAGE.into()),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -2880,7 +2880,7 @@ fn javascript_lang() -> Language {
|
|||
name: "JavaScript".into(),
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_typescript::language_tsx()),
|
||||
Some(tree_sitter_typescript::LANGUAGE_TSX.into()),
|
||||
)
|
||||
.with_brackets_query(
|
||||
r#"
|
||||
|
@ -2907,7 +2907,7 @@ pub fn markdown_lang() -> Language {
|
|||
},
|
||||
..Default::default()
|
||||
},
|
||||
Some(tree_sitter_md::language()),
|
||||
Some(tree_sitter_md::LANGUAGE.into()),
|
||||
)
|
||||
.with_injection_query(
|
||||
r#"
|
||||
|
@ -2930,7 +2930,7 @@ pub fn markdown_inline_lang() -> Language {
|
|||
hidden: true,
|
||||
..LanguageConfig::default()
|
||||
},
|
||||
Some(tree_sitter_md::inline_language()),
|
||||
Some(tree_sitter_md::INLINE_LANGUAGE.into()),
|
||||
)
|
||||
.with_highlights_query("(emphasis) @emphasis")
|
||||
.unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue