editor: Add automatic markdown list continuation on newline and indent on tab#42800
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @claude on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @claude on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
6b4a8da to
04e610b
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @0xRaduan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
04e610b to
29377a5
Compare
|
We require contributors to sign our Contributor License Agreement, and we don't have @0xRaduan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @0xRaduan on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
0xRaduan
left a comment
There was a problem hiding this comment.
tiny self-review
3f246a8 to
4f54ba5
Compare
|
very excited for this |
b42f383 to
a553a34
Compare
|
fixed tests + rebaesd on latest master |
Implements automatic list continuation for Markdown files when pressing Enter. The feature detects three list types and continues them appropriately: - Unordered lists (-, *, +): preserves the marker used - Ordered lists (1., 2., etc.): increments the number in sequence - Task lists (- [ ], - [x]): always inserts unchecked checkbox Key behaviors: - Preserves indentation for nested lists - Stops continuation on empty list items (removes the marker) - Respects the extend_list_on_newline setting (enabled by default) - Only activates for files with Markdown language Fixes zed-industries#5089 Co-authored-by: 0xRaduan <alshed.rad@gmail.com>
cbd1e8d to
beaf074
Compare
smitbarmase
left a comment
There was a problem hiding this comment.
This is a great improvement. I made a bunch of fixes to handle edge cases, and added a few things:
- Instead of hardcoded logic, it’s now configurable per language and supports Markdown out of the box.
- Added a way to indent list items with
Tab, without that this feature felt incomplete. - Did some refactoring and stylistic cleanup around how we handle these prefix scenarios overall, including comments, doc comments, and the new configs.
- Added settings to configure
Tabandnewlinebehavior separately.
Thank you so much for your work!
|
thanks for all your fixes! excited about this getting merged. |
…t on tab (#42800) Closes #5089 Release notes: - Markdown lists now continue automatically when you press Enter (unordered, ordered, and task lists). This can be configured with `extend_list_on_newline` (default: true). - You can now indent list markers with Tab to quickly create nested lists. This can be configured with `indent_list_on_tab` (default: true). --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
…t on tab (zed-industries#42800) Closes zed-industries#5089 Release notes: - Markdown lists now continue automatically when you press Enter (unordered, ordered, and task lists). This can be configured with `extend_list_on_newline` (default: true). - You can now indent list markers with Tab to quickly create nested lists. This can be configured with `indent_list_on_tab` (default: true). --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
…t on tab (zed-industries#42800) Closes zed-industries#5089 Release notes: - Markdown lists now continue automatically when you press Enter (unordered, ordered, and task lists). This can be configured with `extend_list_on_newline` (default: true). - You can now indent list markers with Tab to quickly create nested lists. This can be configured with `indent_list_on_tab` (default: true). --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
…t on tab (zed-industries#42800) Closes zed-industries#5089 Release notes: - Markdown lists now continue automatically when you press Enter (unordered, ordered, and task lists). This can be configured with `extend_list_on_newline` (default: true). - You can now indent list markers with Tab to quickly create nested lists. This can be configured with `indent_list_on_tab` (default: true). --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Closes #5089
Release notes:
extend_list_on_newline(default: true).indent_list_on_tab(default: true).