-
Notifications
You must be signed in to change notification settings - Fork 122
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
Broken IDE intellisense for input, frame modules and others. #375
Comments
This is definitely not intentional; it's an issue with rust-analyzer not being able to handle the attribute proc macros. If you comment out the I'll see if I can chat to the rust-analyzer folk about why this is happening, and what we can do to prevent it. I haven't been able to reproduce this consistently - do you have an example you can share? |
yes I do see the
@philpax this is currently happening in my public project at: |
Cheers, I'll have a look soon! I notice that you have a direct dependency on ambient_api = { path = "/Users/kevzettler/code/Ambient/guest/rust/api" } Do you still see the same issue if you switch to using |
@philpax I just switched to
Unfortunately, The issue still happens |
Cheers, will look into it! |
Had some time to look at it, and realised what the issue was. The proc-macro is only built if R-A sees a binary using it; however, because the To fix this, you need to tell your IDE/R-A to treat the environment as having those features enabled, so that it will attempt to build the binaries and the corresponding proc macro. We have this set up by default for new projects, but it's something that needs to be added to existing projects. To do this for VSCode (sorry, not sure what it is for emacs), create {
"rust-analyzer.cargo.features": ["client", "server"]
} Sorry about this - we should have called this out in the changelog! Let me know if that fixes the issue. |
ok thanks that was the issue. Found an emacs implementation at: |
Can you detail what settings you used for emacs? I'll add both VSCode and Emacs to the known pitfalls docs |
ok I just had to revisit this after some updates and the I had to set the following variables for
|
Furthermore you can add a
|
@kevzettler Would you mind adding this to https://ambientrun.github.io/Ambient/user/setting_up_ide.html ? We should create a section for emacs there |
I'm working on some input handling features and have some Ambient code like:
I wanted to learn more about
input::get_delta
andmessages::Frame
However my IDE cannot look up any definitions,implementations, or declarations for these modules. I have tried in both emacs, and vscode There are gifs below.in emacs:
And in Vscode
Is this a greater configuration issue on my machine? If this is expected behavior this is very unfortunate developer experience. Seems to break expected conventions and very cumbersome to have to go look at Ambient source code directly.
The text was updated successfully, but these errors were encountered: