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

This commit is contained in:
Kirill Bulatov 2025-02-27 17:53:10 +02:00 committed by GitHub
parent 2e98bc17cb
commit e8ef36edcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 101 additions and 9 deletions

View file

@ -1517,7 +1517,8 @@ To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files
"show_other_hints": true,
"show_background": false,
"edit_debounce_ms": 700,
"scroll_debounce_ms": 50
"scroll_debounce_ms": 50,
"toggle_on_modifiers_press": null
}
```
@ -1539,6 +1540,22 @@ Use the `lsp` section for the server configuration. Examples are provided in the
Hints are not instantly queried in Zed, two kinds of debounces are used, either may be set to 0 to be disabled.
Settings-related hint updates are not debounced.
All possible config values for `toggle_on_modifiers_press` are:
```json
"inlay_hints": {
"toggle_on_modifiers_press": {
"control": true,
"shift": true,
"alt": true,
"platform": true,
"function": true
}
}
```
Unspecified values have a `false` value, hints won't be toggled if all the modifiers are `false` or not all the modifiers are pressed.
## Journal
- Description: Configuration for the journal.