-
Notifications
You must be signed in to change notification settings - Fork 43
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
Custom file output format #27
Comments
Much of this goes back to how In my case, I regularly use Visual Studio Code with the rust-analyzer plugin, and I don't seem to have the same issue that you appear to be indicating you have. I tried this in two fashions, from within and without the same crate where the definitions are being included, and I had no problems getting VSCode to bring up the trait methods: Of note, the But, if I have already imported If you're more worried about the fact that "Go to definition" leads you to the |
Note that if you want this, you can specify the path manually with an attribute: #[path = "helloworld.abstract.v1.rs"]
mod helloworld_abstract_v1; |
Nice this actually helps me a lot, had not tried that. Will close this as we have a viable workaround. Thanks! |
As per the docs:
While this is a nice readable format having a dot in the file name makes it incompatible with rust for use directly with
mod
. The result is we are required to useinclude
macro. But IDE's such as vscode with rust extension are unable to reference the definition for traits etc. This is sort of a big deal for developer UX.If we allowed the separator to be configurable IE
_
helloworld_abstract_v1.rs.
would be valid. That would allow the below which also allows visibility into the trait source via IDE.I imagine this would mess with your prost-crate assumptions so perhaps we could gate this an not compatible? Or better yet we could adopt this output? :)
The text was updated successfully, but these errors were encountered: