Add a way to toggle inlay hints with modifiers #2 (#25766)

https://github.com/zed-industries/zed/pull/25752 with fixes on top

* Ensures no flickering happens for all modifiers `: false` case
* Dismisses the toggled state on focus out
* Reworks cache state so that "enabled" and "toggled by modifiers" are
different states with their own lifecycle

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2025-02-28 10:03:25 +02:00 committed by GitHub
parent bb3aef15eb
commit 7440833ff1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 166 additions and 26 deletions

View file

@ -1537,6 +1537,7 @@ async fn test_mutual_editor_inlay_hint_cache_update(
show_parameter_hints: false,
show_other_hints: true,
show_background: false,
toggle_on_modifiers_press: None,
})
});
});
@ -1552,6 +1553,7 @@ async fn test_mutual_editor_inlay_hint_cache_update(
show_parameter_hints: false,
show_other_hints: true,
show_background: false,
toggle_on_modifiers_press: None,
})
});
});
@ -1770,6 +1772,7 @@ async fn test_inlay_hint_refresh_is_forwarded(
show_parameter_hints: false,
show_other_hints: false,
show_background: false,
toggle_on_modifiers_press: None,
})
});
});
@ -1785,6 +1788,7 @@ async fn test_inlay_hint_refresh_is_forwarded(
show_parameter_hints: true,
show_other_hints: true,
show_background: false,
toggle_on_modifiers_press: None,
})
});
});