[ty] Short-circuit inlayhints request if disabled in settings (#19963)

This commit is contained in:
Micha Reiser 2025-08-18 12:35:40 +02:00 committed by GitHub
parent 4ac2b2c222
commit 67529edad6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View file

@ -85,6 +85,13 @@ pub struct InlayHintSettings {
/// foo("x="1)
/// ```
pub call_argument_names: bool,
// Add any new setting that enables additional inlays to `any_enabled`.
}
impl InlayHintSettings {
pub fn any_enabled(&self) -> bool {
self.variable_types || self.call_argument_names
}
}
impl Default for InlayHintSettings {