m1guer / basedpyright-zed

17 stars 2 forks source link

Better Setup Instruction in README #6

Open arv-anshul opened 1 month ago

arv-anshul commented 1 month ago

I am configuring my Zed with this extension but getting too many problems like how to sync with my current project's virtual environment (which I figured out from Issue #3).

Even after that I'm struggling to change the default behaviour of basedpyright's typeCheckingMode to standard (by-default behaviour is strict).

BTW, currently I've configured my pyproject.toml to change the typeCheckingMode, which is not what I want instead I want to configure this setting in Zed's settings.json file which allow me to work with projects without creating pyproject.toml file.

[tool.basedpyright]
typeCheckingMode = "standard"
my current lsp config for `basedpyright` ```jsonc "lsp": { "basedpyright": { "settings": { // TODO: include "typeCheckingMode" option here instead of pyproject.toml file // "analysis": { "typeCheckingMode": "off" }, // this doesn't works (i've tried from docs) "python": { "pythonPath": ".venv/bin/python" } } } } ```

[!IMPORTANT]

Please add some instruction regarding these configurations for settings.json in README.md. Also, add related docs for more info.

❤️ Thanks for the extension!

m1guer commented 1 month ago

working on.

HamzaFarhan commented 3 weeks ago

Any update on this?

m1guer commented 3 weeks ago

sorry, iam out of time.

HamzaFarhan commented 3 weeks ago

That's fine. Do we know what should be in our pyproject.toml and what should be in our settings.json?

skewty commented 3 weeks ago

@arv-anshul it is important to note that according to the official basedpyright docs the [tool.pyright] section in pyproject.toml is also supported by basedpyright for backwards compatibility.

That said, does this extension support the same when it comes to Zed's settings.json file (will it read settings from lsp.basedpyright and fallback to lsp.pyright? I don't believe this is made clear in the README.md file.

Also, which basedpyright is used by this extension? The one in my system path or the one in the project virtualenv? Does one take precedence over the other? I don't believe this is made clear in the README.md file.