Closes #40757 ## Summary This PR addresses an issue where Zed incorrectly adjusts the indentation of Markdown lists when inserting text using multiple cursors. Currently: - Editing individual lines with a single cursor behaves correctly (no unwanted indentation changes). - Using multiple cursors, Zed automatically adjusts the indentation, unlike VS Code, which preserves the existing formatting. ## Tasks - [x] Implement a new test to verify correct Markdown indentation behavior with multiple cursors. - [x] Apply the fix to prevent Zed from adjusting indentation when inserting text on multiple cursors. ------------------------ Release Notes: - Fixed an issue where inserting text with multiple cursors inside a nested Markdown list would cause it to lose its indentation. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
29 lines
1.0 KiB
TOML
29 lines
1.0 KiB
TOML
name = "Markdown"
|
|
grammar = "markdown"
|
|
path_suffixes = ["md", "mdx", "mdwn", "markdown", "MD"]
|
|
completion_query_characters = ["-"]
|
|
block_comment = { start = "<!--", prefix = "", end = "-->", tab_size = 0 }
|
|
autoclose_before = ";:.,=}])>"
|
|
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 },
|
|
{ start = "*", end = "*", close = false, newline = false, surround = true },
|
|
]
|
|
rewrap_prefixes = [
|
|
"[-*+]\\s+",
|
|
"\\d+\\.\\s+",
|
|
">\\s*",
|
|
"[-*+]\\s+\\[[\\sx]\\]\\s+"
|
|
]
|
|
|
|
auto_indent_on_paste = false
|
|
auto_indent_using_last_non_empty_line = false
|
|
tab_size = 2
|
|
decrease_indent_pattern = "^\\s*$"
|
|
prettier_parser_name = "markdown"
|