-
Notifications
You must be signed in to change notification settings - Fork 115
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
make tonic build output to src/xxx #253
Comments
goland can jump to it fwiw, are you sure vscode cannot? storing generated code in tree doesn't seem common in rust |
Yes, my vscode could not. I am using windows and developing via vscode ssh. I tried to change to goland ssh, but the goland cost is very huge. |
This is explicitly not recommended: https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script. Tools like https://github.com/dtolnay/cargo-expand can help, also looks like maybe some vscode settings: rust-lang/rust-analyzer#5799 |
rust-lang/rust-analyzer#5799 This does not help |
macro expansion is part of rust-analyzer. It's a little less ergonomic to first jump to the macro, then trigger this but it works well enough to skim the generated code as needed. My setup (vim) doesn't give me any proper code navigation within the expanded macro though. Not sure if CLion does. I don't think you need any settings, just trigger this action: source: https://rust-analyzer.github.io/manual.html#expand-macro-recursively |
Let me have a try |
After config as https://github.com/hyperium/tonic#getting-started
it can jump to macro here https://github.com/istio/ztunnel/blob/master/src/xds/types.rs#L31-L36 And then trigger this action: |
Does it support autojump? I test at local, it can show but can not jump. |
No it does not support autojump. |
so that we could use that mod directly and vscode can jump to the definition of the generated code
The text was updated successfully, but these errors were encountered: