-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support #[doc = include_str!(...)]
in hover documentation
#11137
Comments
Just checking the name is not enough. A different macro called |
cc #8092 |
We'll also have trouble finding the file, right? CC #10178 |
Another addition here, I'm generating some documentation using |
I have created the lsp_doc crate that provides a workaround for the LSP hover/preview, and it is compatible with the Installation cargo add lsp_doc Usage /// Here is a table:
#[lsp_doc("table.md")]
/// Here is some long piece of text:
#[lsp_doc("lorem.md")]
fn anything() {} Neovim VSCode Hope that helps in the mean time! |
It'd be nice if external documentation could show up in hover tooltips
#[doc = include_str!(...)]
attributes are currently thrown away here:https://github.com/rust-analyzer/rust-analyzer/blob/355a4bdb883ee9edc1c32b553fcf91c302b3df19/crates/hir_def/src/attr.rs#L696-L707
Hacking together a new branch is easy enough:
But I'm having difficulty figuring out how to plumb my way into
hir_expand::builtin_fn_macro::include_str_expand
, or to figure out the path of the current AST, or figuring out if this is even the right place to be handling this.The text was updated successfully, but these errors were encountered: