Skip to content

editor: Add automatic markdown list continuation on newline and indent on tab#42800

Merged
smitbarmase merged 29 commits intozed-industries:mainfrom
0xRaduan:claude/zed-issue-5089-01H4KSUx3kjei8oA1jE8WPw7
Dec 19, 2025
Merged

editor: Add automatic markdown list continuation on newline and indent on tab#42800
smitbarmase merged 29 commits intozed-industries:mainfrom
0xRaduan:claude/zed-issue-5089-01H4KSUx3kjei8oA1jE8WPw7

Conversation

@0xRaduan
Copy link
Contributor

@0xRaduan 0xRaduan commented Nov 15, 2025

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).

@cla-bot
Copy link

cla-bot bot commented Nov 15, 2025

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'.

@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Nov 15, 2025

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against a275203

@0xRaduan
Copy link
Contributor Author

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Nov 15, 2025

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
Copy link

cla-bot bot commented Nov 15, 2025

The cla-bot has been summoned, and re-checked this pull request!

@0xRaduan 0xRaduan force-pushed the claude/zed-issue-5089-01H4KSUx3kjei8oA1jE8WPw7 branch from 6b4a8da to 04e610b Compare November 15, 2025 11:46
@cla-bot
Copy link

cla-bot bot commented Nov 15, 2025

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'.

@0xRaduan 0xRaduan force-pushed the claude/zed-issue-5089-01H4KSUx3kjei8oA1jE8WPw7 branch from 04e610b to 29377a5 Compare November 15, 2025 11:46
@cla-bot
Copy link

cla-bot bot commented Nov 15, 2025

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'.

@0xRaduan
Copy link
Contributor Author

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Nov 15, 2025

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
Copy link

cla-bot bot commented Nov 15, 2025

The cla-bot has been summoned, and re-checked this pull request!

@0xRaduan
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 15, 2025
@cla-bot
Copy link

cla-bot bot commented Nov 15, 2025

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Contributor Author

@0xRaduan 0xRaduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny self-review

@Feel-ix-343
Copy link
Contributor

very excited for this

@0xRaduan 0xRaduan force-pushed the claude/zed-issue-5089-01H4KSUx3kjei8oA1jE8WPw7 branch from b42f383 to a553a34 Compare December 13, 2025 14:01
@0xRaduan
Copy link
Contributor Author

fixed tests + rebaesd on latest master

@smitbarmase smitbarmase moved this from Community PRs to In progress in Quality Week – December 2025 Dec 16, 2025
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>
@smitbarmase smitbarmase force-pushed the claude/zed-issue-5089-01H4KSUx3kjei8oA1jE8WPw7 branch from cbd1e8d to beaf074 Compare December 19, 2025 15:39
Copy link
Member

@smitbarmase smitbarmase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Tab and newline behavior separately.

Thank you so much for your work!

@smitbarmase smitbarmase changed the title Add automatic markdown list continuation on newline editor: Add automatic markdown list continuation on newline and indent on tab Dec 19, 2025
@smitbarmase smitbarmase merged commit a7e0701 into zed-industries:main Dec 19, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Quality Week – December 2025 Dec 19, 2025
@0xRaduan
Copy link
Contributor Author

thanks for all your fixes! excited about this getting merged.

rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
…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>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…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>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…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>
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

Development

Successfully merging this pull request may close these issues.

Detect lists and automatically insert the appropriate item

5 participants