Files
oak-gpui/crates
Michael Sloan e43ad858d8 Add debug methods for visually annotating ranges (#38097)
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
2025-09-13 03:37:24 +00:00
..
2025-09-12 18:07:59 +02:00
2025-09-12 15:22:51 +00:00
2025-09-08 21:53:17 -06:00
2025-09-10 22:48:33 +02:00
2025-09-08 21:53:17 -06:00
2025-09-12 14:45:38 -04:00
2025-09-03 22:10:14 +00:00
2025-09-12 14:45:38 -04:00
2025-09-12 14:45:38 -04:00
2025-08-19 20:33:44 +00:00
2025-09-08 21:53:17 -06:00
2025-09-09 20:08:05 +00:00
2025-09-10 16:13:41 -04:00
2025-09-08 21:53:17 -06:00
2025-09-12 17:47:07 +02:00