zed
zed copied to clipboard
support global pyright setting in zed settings
Check for existing issues
- [X] Completed
Describe the feature
support global pyright setting in zed settings so that users don't need to generate pyrightconfig.json in every project dir.
If applicable, add mockups / screenshots to help present your vision of the feature
No response
something like:
"lsp": {
"pyright": {
"enabled": true,
"pythonVersion": "3.11",
"venvPath": ".",
"venv": ".venv",
"typeCheckingMode": "strict",
"strictListInference": true,
"reportDuplicateImport": true,
"reportMissingImports": true,
"reportMissingTypeStubs": false,
"defineConstant": { "DEBUG": true }
}
}
or pylance in VSCode:
{
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticSeverityOverrides": {
"reportMissingModuleSource": "none"
},
"python.analysis.typeshedPaths": [
".venv/Lib/site-packages"
],
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
}
Made a PR that should allow this:
https://github.com/zed-industries/zed/pull/14265
@FilipeBisinella
Dependency resolution still doesn't work for me with the folowing configuration in settings.json:
"lsp": {
"pyright": {
"settings": {
"python": {
"venvPath": ".",
"venv": ".venv"
}
}
}
}
At the same time, it works fine with pyrightconfig.json:
{
"venvPath": ".",
"venv": ".venv"
}
I'm running zed preview 0.144.3 f11a992
The pyright global settings are different from the pyrightconfig.json ones. Try with:
"lsp": {
"pyright": {
"settings": {
"python": {
"pythonPath": ".venv/bin/python"
}
}
}
}
Got it!
I tried setting pythonPath, also no luck
Looks like this PR was included in the v0.145.0-pre release.
Thanks, I have just updated to 0.145 and it works well :+1: