Bump tree-sitter and related core language parser libraries (#14986)
Closes https://github.com/zed-industries/zed/issues/4565 To fix issues with code blocks' parsing in Markdown, a tree-sitter-markdown library update is needed. But `tree_sitter::language` is used in many places within core Zed, which forced more library updates. Release Notes: - Updated tree-sitter parsers for core languages --------- Co-authored-by: Max Brunsfeld <max@zed.dev> Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
parent
fd4a4127eb
commit
596ee58be8
24 changed files with 282 additions and 196 deletions
|
@ -87,12 +87,12 @@
|
|||
"typename"
|
||||
"union"
|
||||
"using"
|
||||
"virtual"
|
||||
"volatile"
|
||||
"while"
|
||||
(primitive_type)
|
||||
(sized_type_specifier)
|
||||
(type_qualifier)
|
||||
(virtual)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
(var_spec
|
||||
name: (identifier) @name) @item))
|
||||
|
||||
(method_spec
|
||||
(method_elem
|
||||
name: (_) @name
|
||||
parameters: (parameter_list
|
||||
"(" @context
|
||||
|
|
|
@ -41,13 +41,14 @@ pub fn init(
|
|||
("cpp", tree_sitter_cpp::language()),
|
||||
("css", tree_sitter_css::language()),
|
||||
("go", tree_sitter_go::language()),
|
||||
("gomod", tree_sitter_gomod::language()),
|
||||
("gomod", tree_sitter_go_mod::language()),
|
||||
("gowork", tree_sitter_gowork::language()),
|
||||
("jsdoc", tree_sitter_jsdoc::language()),
|
||||
("json", tree_sitter_json::language()),
|
||||
("jsonc", tree_sitter_json::language()),
|
||||
("markdown", tree_sitter_markdown::language()),
|
||||
("proto", tree_sitter_proto::language()),
|
||||
("markdown", tree_sitter_md::language()),
|
||||
("markdown-inline", tree_sitter_md::inline_language()),
|
||||
("proto", protols_tree_sitter_proto::language()),
|
||||
("python", tree_sitter_python::language()),
|
||||
("regex", tree_sitter_regex::language()),
|
||||
("rust", tree_sitter_rust::language()),
|
||||
|
@ -136,6 +137,7 @@ pub fn init(
|
|||
json_task_context()
|
||||
);
|
||||
language!("markdown");
|
||||
language!("markdown-inline");
|
||||
language!(
|
||||
"python",
|
||||
vec![Arc::new(python::PythonLspAdapter::new(
|
||||
|
|
15
crates/languages/src/markdown-inline/config.toml
Normal file
15
crates/languages/src/markdown-inline/config.toml
Normal file
|
@ -0,0 +1,15 @@
|
|||
name = "Markdown-Inline"
|
||||
grammar = "markdown-inline"
|
||||
path_suffixes = []
|
||||
word_characters = ["-"]
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "(", end = ")", close = true, newline = true },
|
||||
{ start = "<", end = ">", close = true, newline = true },
|
||||
{ start = "\"", end = "\"", close = false, newline = false },
|
||||
{ start = "'", end = "'", close = false, newline = false },
|
||||
{ start = "`", end = "`", close = false, newline = false },
|
||||
]
|
||||
|
||||
tab_size = 2
|
6
crates/languages/src/markdown-inline/highlights.scm
Normal file
6
crates/languages/src/markdown-inline/highlights.scm
Normal file
|
@ -0,0 +1,6 @@
|
|||
(emphasis) @emphasis
|
||||
(strong_emphasis) @emphasis.strong
|
||||
(code_span) @text.literal
|
||||
(link_text) @link_text
|
||||
(link_label) @link_text
|
||||
(link_destination) @link_uri
|
|
@ -1,6 +1,3 @@
|
|||
(emphasis) @emphasis
|
||||
(strong_emphasis) @emphasis.strong
|
||||
|
||||
[
|
||||
(atx_heading)
|
||||
(setext_heading)
|
||||
|
@ -14,11 +11,6 @@
|
|||
(list_marker_parenthesis)
|
||||
] @punctuation.list_marker
|
||||
|
||||
(code_span) @text.literal
|
||||
|
||||
(fenced_code_block
|
||||
(info_string
|
||||
(language) @text.literal))
|
||||
|
||||
(link_destination) @link_uri
|
||||
(link_text) @link_text
|
||||
|
|
|
@ -2,3 +2,6 @@
|
|||
(info_string
|
||||
(language) @language)
|
||||
(code_fence_content) @content)
|
||||
|
||||
((inline) @content
|
||||
(#set! "language" "markdown-inline"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue