mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:44:56 +00:00
[ty] Short-circuit inlayhints request if disabled in settings (#19963)
This commit is contained in:
parent
4ac2b2c222
commit
67529edad6
2 changed files with 11 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue