ZIm/docs/src
Thorsten Ball ddca6a3fb7
Debounce refresh of inlay hints on buffer edits (#8282)
I think this makes it less chaotic to edit text when the inlay hints are
on.

It's for cases where you're editing to the right side of an inlay hint.
Example:

```rust
for name in names.iter().map(|item| item.len()) {
    println!("{:?}", name);
}
```

We display a `usize` inlay hint right next to `name`.

But as soon as you remove that `.` in `names.iter` your cursor jumps
around because the inlay hint has been removed.

With this change we now have a 700ms debounce before we update the inlay
hints.

VS Code seems to have an even longer debounce, I think somewhere around
~1s.

Release Notes:

- Added debouncing to make it easier to edit text when inlay hints are
enabled and to save rendering of inlay hints when scrolling. Both
debounce durations can be configured with `{"inlay_hints":
{"edit_debounce_ms": 700}}` (default) and `{"inlay_hints":
{"scroll_debounce_ms": 50}}`. Set a value to `0` to turn off the
debouncing.


### Before


https://github.com/zed-industries/zed/assets/1185253/3afbe548-dcfb-45a3-ab9f-cce14c04a148



### After



https://github.com/zed-industries/zed/assets/1185253/7ea90e42-bca6-4f6c-995e-83324669ab43

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-02-27 11:18:13 +01:00
..
languages Add language server for Terraform (#7657) 2024-02-26 17:08:49 -08:00
CODE_OF_CONDUCT.md Adjust heading levels in docs (#7163) 2024-01-31 12:34:31 -05:00
configuring_zed.md Debounce refresh of inlay hints on buffer edits (#8282) 2024-02-27 11:18:13 +01:00
configuring_zed__configuring_vim.md Remove links to docs.zed.dev (#7187) 2024-01-31 22:26:15 -07:00
configuring_zed__key_bindings.md Format docs with Prettier (#8134) 2024-02-21 13:21:22 -05:00
developing_zed__adding_languages.md Adjust heading levels in docs (#7163) 2024-01-31 12:34:31 -05:00
developing_zed__building_zed.md Update docs for building Zed (#8092) 2024-02-20 17:34:13 -05:00
developing_zed__building_zed_linux.md Linux: adjust docs for building (#8246) 2024-02-22 22:56:18 -08:00
developing_zed__building_zed_macos.md Update docs for building Zed (#8092) 2024-02-20 17:34:13 -05:00
developing_zed__debugging_crashes.md Add ./script/symbolicate (#8165) 2024-02-22 08:50:39 -07:00
developing_zed__local_collaboration.md Adjust heading levels in docs (#7163) 2024-01-31 12:34:31 -05:00
feedback.md Adjust heading levels in docs (#7163) 2024-01-31 12:34:31 -05:00
getting_started.md Adjust heading levels in docs (#7163) 2024-01-31 12:34:31 -05:00
SUMMARY.md Add task docs and default keybindings (#8123) 2024-02-21 16:43:56 +02:00
system_requirements.md Update all links point to community 2024-01-24 15:11:17 -05:00
tasks.md Add task docs and default keybindings (#8123) 2024-02-21 16:43:56 +02:00
telemetry.md Adjust heading levels in docs (#7163) 2024-01-31 12:34:31 -05:00