project: Fix organize imports action not working for Python (#45874)
Closes https://github.com/zed-industries/zed/issues/26819 Explained in https://github.com/zed-industries/zed/issues/26819#issuecomment-3399175027 That action is now the default on format in https://github.com/zed-industries/zed/pull/41103 since October, but applying manually is still broken. Release Notes: - Fixed an issue where the `editor: organize imports` action didn’t work for Python, even though imports were organized correctly during formatting.
This commit is contained in:
1 parent
a1bacce89a
commit
49e4102351
2 files changed
+33
-12
No files matched your search
@@ -2061,6 +2061,12 @@ impl LspAdapter for BasedPyrightLspAdapter {
|
||||
}
|
||||
Some(())
|
||||
});
|
||||
// Disable basedpyright's organizeImports so ruff handles it instead
|
||||
if let serde_json::map::Entry::Vacant(v) =
|
||||
object.entry("basedpyright.disableOrganizeImports")
|
||||
{
|
||||
v.insert(Value::Bool(true));
|
||||
}
|
||||
}
|
||||
|
||||
user_settings
|
||||
|
||||
Reference in new issue
Block a user