-
Notifications
You must be signed in to change notification settings - Fork 3.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python lsp: Pyright isn't good #7296
Comments
Yeah, We are working on language plugins at the moment, so, in the not-so-distant future, someone can just add these servers as plugins, but I do think we should swap out our provided one for a bettter one. |
Indeed they did build a language server protocol for Ruff already |
AFAICT, |
See that python-dotenv is installed, along with pydantic in my env - (pip list) but I guess pyright is not checking for packages in the project-directory/.venv ??? |
You need this file.
|
There's an issue #8541 about resolving modules with Pyright. |
I see this problem last for months, but there's still no real solution? |
This should actually solve the problem - for some reason, during the migration of our documentation, we lost our Python docs that mentions this config file. I've quickly dumped the old Python docs contents into the As a side note, I want to say that we are going to be doing more for Python here shortly - we recognize just how important this language is, being one of the top most-used languages, and we want to improve for Python devs in Zed. |
I tried it, but no luck. I use poetry in my python project, does it matter? |
To add to the corpus of Pyright issues, in
Additionally, in
I have done no custom configuration. I believe these shouldn't be showing issues as they work as expected and are standard practices. |
@newtome8888 run {
"venvPath": "/Users/username/Library/Caches/pypoetry/virtualenvs",
"venv": "projectname-p0LYZhue-py3.11"
} |
Just to mention, there is a setting in poetry tells poetry to install the venv within the project: Which would stabilize where the |
Using pyright is literally painful. |
I am running into the same issue. it's hurting more than its helping. |
your welcome, im just waiting for the review approvement. i fixed all the bugs related to the schema. |
neither mkdir .zed # in the root folder of the project
touch .zed/settings.json in that {
"tools": {
"ruff": {
"command": "ruff",
"args": ["--format", "json", "--stdin-filename", "$FILENAME", "-"],
"rootPatterns": ["pyproject.toml", "setup.cfg", ".git"],
"filePatterns": ["*.py"],
"runOnSave": true,
"errorPatterns": [
{
"regexp": "^(.*?):(\\d+):(\\d+): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
}
} if using another linter, adjust accordingly. |
Is there any chance of support for the mypy daemon? |
it's |
Any updates here? current pyright in Zed is down right disapponting . |
ruff and basedpyright are on extensions. |
I don't want people to be burdened by too much choice but I put together an extension using Thus far I'm enjoying it and it feels like one I should submit to the extensions repo. |
Wow, pyright eats 3.5G of RAM after a few days. Never had this with jedi. |
How to disable pyright and move to pylsp ? |
Add https://github.com/rgbkrk/python-lsp-zed-extension as another Python LSP option. Motivated by requests and pain points in zed-industries/zed#7296. --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
You can now search for "Python LSP" in extensions to enable it. Note that you will need to install the python lsp server directly first. Read more in the |
Is the "Go to Definition" feature implemented in your plugin? I would like to try Zed on Win11. Could you please provide more detailed instructions on how to set up the plugin? |
Even with |
Has anyone successfully started pylsp and been able to use the code completion feature? Even though I installed |
@failable You should also have |
|
Do you have it in PATH? |
Question (I can open a different issue if needed, but I thought asking here is Ok, if not, please let me know). I have my own language server that I do for Python (https://marketplace.visualstudio.com/items?itemName=fabioz.vscode-pydev), how can I stop using the builtin one to use my own? -- i.e.: if I register another Python extension (as in https://github.com/rgbkrk/python-lsp-zed-extension/), will it stop using the builtin one, which is giving me pyright errors? |
My only gripe with pylsp is that, as of today, basedpyright is a more fleshed out type checker with more features such as inlay hints, and a very active developer who's pushing patches on a weekly basis, whereas pylsp seems to be a bit stale and features such as inlay hints are still missing. Furthermore from my perspective having the formatter (Ruff) in parallel to the LSP is a more flexible experience than having the formatter hierarchically under the the LSP (as a plugin). But I am not well acquainted with the technicalities of this topic so perhaps there is a performance/scaling consideration that I'm not aware of. |
There is any simple way to replace pyright with mypy? Pyright being the default is kinda a deal breaker for me. |
You can use mypy with pylsp that's the other language server provided out of the box. |
for macOS using pylsp with ruff, here is my setup:
Install python-lsp-ruff:
|
I can rely on that. I've give a try to By the way, I actually have to use Not sure if this is the best config but it works as intended. Just my 2 cents experience. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Check for existing issues
Describe the feature
it should be pylsp. The pyright has issues about recognize libraries installed
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: