History

Add auto-surround support for tilde in Markdown (#58614)

This enables you to easily add strikethroughs to text you have selected by typing `~` twice. This matches VS Code's behavior. Self-Review Checklist: - [X] I've reviewed my own diff for quality, security, and reliability - [X] Unsafe blocks (if any) have justifying comments - [X] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [X] Performance impact has been considered and is acceptable Release Notes: - Added support for surrounding selected Markdown text with `~` by typing `~`

Joseph T. Lyons committed 5 months ago

Commit fcb95aa1 parent c83cef41 file · +1 −0Browse files

Unified · Split

crates/grammars/src/markdown/config.toml+1−0
@@ -14,6 +14,7 @@ brackets = [ · 13 unmodified lines
14 { start = "'", end = "'", close = false, newline = false },14 { start = "'", end = "'", close = false, newline = false },
15 { start = "`", end = "`", close = false, newline = false },15 { start = "`", end = "`", close = false, newline = false },
16 { start = "*", end = "*", close = false, newline = false, surround = true },16 { start = "*", end = "*", close = false, newline = false, surround = true },
17 { start = "~", end = "~", close = false, newline = false, surround = true },
17]18]
18rewrap_prefixes = [19rewrap_prefixes = [
19 "[-*+]\\s+",20 "[-*+]\\s+",