default to typeCheckingMode=standard
This commit is contained in:
parent
182e16d3b3
commit
80d7fdb251
1 changed files with 22 additions and 13 deletions
|
@ -1599,15 +1599,12 @@ impl LspAdapter for BasedPyrightLspAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always set the python interpreter path
|
// Set both pythonPath and defaultInterpreterPath for compatibility
|
||||||
// Get or create the python section
|
if let Some(python) = object
|
||||||
let python = object
|
|
||||||
.entry("python")
|
.entry("python")
|
||||||
.or_insert(Value::Object(serde_json::Map::default()))
|
.or_insert(Value::Object(serde_json::Map::default()))
|
||||||
.as_object_mut()
|
.as_object_mut()
|
||||||
.unwrap();
|
{
|
||||||
|
|
||||||
// Set both pythonPath and defaultInterpreterPath for compatibility
|
|
||||||
python.insert(
|
python.insert(
|
||||||
"pythonPath".to_owned(),
|
"pythonPath".to_owned(),
|
||||||
Value::String(interpreter_path.clone()),
|
Value::String(interpreter_path.clone()),
|
||||||
|
@ -1618,6 +1615,18 @@ impl LspAdapter for BasedPyrightLspAdapter {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !object.contains_key("typeCheckingMode")
|
||||||
|
&& let Some(analysis) = object
|
||||||
|
.entry("basedpyright.analysis")
|
||||||
|
.or_insert(Value::Object(serde_json::Map::default()))
|
||||||
|
.as_object_mut()
|
||||||
|
{
|
||||||
|
analysis
|
||||||
|
.entry("typeCheckingMode")
|
||||||
|
.or_insert("standard".into());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
user_settings
|
user_settings
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue