editor: Fix auto-indent cases in Markdown (#44616)
Builds on https://github.com/zed-industries/zed/pull/40794 and https://github.com/zed-industries/zed/pull/44381 - Fixes the case where creating a new line inside a nested list puts the cursor correctly under that nested list item. - Fixes the case where typing a new list item at the expected indent no longer auto-indents or outdents incorrectly. Release Notes: - Fixed an issue in Markdown where new list items weren’t respecting the expected indentation on type.
This commit is contained in:
@@ -24,5 +24,9 @@ rewrap_prefixes = [
|
||||
auto_indent_on_paste = false
|
||||
auto_indent_using_last_non_empty_line = false
|
||||
tab_size = 2
|
||||
decrease_indent_pattern = "^.*$"
|
||||
decrease_indent_patterns = [
|
||||
{ pattern = "^\\s*-", valid_after = ["list_item"] },
|
||||
{ pattern = "^\\s*\\d", valid_after = ["list_item"] },
|
||||
{ pattern = "^\\s*", valid_after = ["list_item"] },
|
||||
]
|
||||
prettier_parser_name = "markdown"
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
(list (list_item) @indent)
|
||||
|
||||
(list_item) @start.list_item
|
||||
|
||||
Reference in New Issue
Block a user