mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-24 01:20:29 +01:00
e43ad858d8
This allows you to write `buffer_snapshot.debug(ranges, value)` and it will be displayed in the buffer (or multibuffer!) until that callsite runs again. `ranges` can be any position (`usize`, `Anchor`, etc), any range, or a slice or vec of those. `value` just needs a `Debug` impl. These are stored in a mutable global for convenience, and this is only available in debug builds. For example, using this to visualize the captures of the brackets Tree-sitter query: <img width="1215" height="480" alt="image" src="https://github.com/user-attachments/assets/c1878fc7-f6b3-4e27-949e-ecf67a7906b9" /> Release Notes: - N/A