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
47.94k stars 2.83k forks source link

proc macros failing on rust-analyzer only when using zed #4534

Open superyuuki opened 1 year ago

superyuuki commented 1 year ago

Check for existing issues

Describe the bug / provide steps to reproduce it

image

Proc macroes do not expand correctly. I am using the Ambient library which uses a proc macro [#main] to do a lot of work. In zed, this proc macro fails to expand according to the language server and breaks all autocorrect. In VSCode, this proc macro works correctly. I have confirmed that this issue occurs when using the same rust-analyzer binary that is downloaded with the vscode rust-analyzer extension, so the issue is a strange interaction between zed and rust-analyzer.

Separate, but where is tree-sitter used? In my language server folder i cannot find the rust tree sitter implementation?

Environment

Zed: v0.98.2 (stable) OS: macOS 12.6.0 Memory: 8 GiB Architecture: aarch64

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

sad analyzer :(

image

happy analyzer :)

image

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

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

JosephTLyons commented 1 year ago

This is a strange issue @superyuuki, I'll raise it up with the team.

github-actions[bot] commented 1 week ago

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. Are you able to reproduce this issue in the latest version of Zed? If so, please let us know by commenting on this issue and we will keep it open; otherwise, we'll close it in a week. Feel free to open a new issue if you're seeing this message after the issue has been closed. Thanks for your help!