zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
45.5k stars 2.49k forks source link

Pyright issues aren't highlighted in the editor #10465

Open ozozozd opened 4 months ago

ozozozd commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Example code:

    return variable_a

Environment

Zed: v0.130.6 (Zed) OS: macOS 13.6.6 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

hbilal9 commented 4 months ago

Zed 0.130.6 MacOs 14.0 (23A344)

pyrightconfig.json

{
  "venvPath": ".",
  "venv": "venv"
}

Zed is still not good for django and django rest framework as like VS code

Screenshot 2024-04-13 at 12 04 33 PM Screenshot 2024-04-13 at 12 05 19 PM
JosephTLyons commented 4 months ago

@ozozozd, have you added a pyrightconfig.json file at your project's root, like @hbilal9 mentioned?

hbilal9 commented 4 months ago

@JosephTLyons yes it is at project root. when remove pyrightconfig.json then django other modules also through error. after adding pyrightconfig now just warning of what I mentioned above

notpeter commented 2 months ago

Just checking in to see if this is still occurring.

@ozozozd Were you able to add pyrightconfig.json as suggested? Did this change anything?

@hbilal9 This may be an area where we need to add some additional configuration documentation or tweak our pyright integration. Would you be willing to work with me to develop a minimal project that demonstrates the issue?

hbilal9 commented 2 months ago

@notpeter yeah sure we can

JosephTLyons commented 2 months ago

Once we have venv detection, it seems like we could automatically generate the config file after the user picks their venv in Zed.

I worked on a branch that pulled up the discovered venvs in a modal popup that the user could pick from, but the work was put to the side for various reasons - probably for the best because there {is, will be} better tooling for venv discovery once some PRs land in uv - much better than rolling our own.

hbilal9 commented 2 months ago

@JosephTLyons even when we generate manually pyrightconfig.json it solve venv problem but still type missing in django or maybe can miss in other frameworks also.

I've also mentioned here