-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Hover: Show documentation #196
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
Conversation
impl FileSymbol { | ||
pub fn docs(&self, file: &File) -> Option<String> { | ||
file.syntax().descendants() | ||
.filter(|node| node.kind() == self.kind && node.range() == self.node_range) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we probably should move FileSymbols to ra_analysis, and use SyntaxPtr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea. I can tackle that in a separate PR.
LGTM |
@matklad is this good to go? |
Ci's failing, otherwise LGTM! |
It looks like it failed on the format check so I rebased and ran |
The right command is |
bors r+ Thanks! |
196: Hover: Show documentation r=matklad a=kjeremy Closes #186 Co-authored-by: Jeremy A. Kolb <[email protected]>
Build failed |
bors retry |
196: Hover: Show documentation r=matklad a=kjeremy Closes #186 Co-authored-by: Jeremy A. Kolb <[email protected]>
bors r+ |
Not awaiting review |
bors or travis are having a bad day it seems, merging manually. |
Timed out |
Emacs has now two LSP clients, the more minimalistic and lightweight Eglot and the extensive though a bit bloated LSP-Mode. Eglot will soon be shipped with Emacs29. Both have rust-analyzer enabled by default and require no further setup then just being installed and enabled. `lsp-rust.el` is not required anymore. The base-installation for each of those modes is so easy now that I don't think an enumerated list is necessary, both package can be installed via the standard `M-x package-install` and the installation is a one-liner that I provide. Configuration mostly comes into play for support the rust-analyzer extensions to the LSP protocol, which are built into LSP mode and require an extension-package for Eglot. But for the configuration beyond the base configuration I link against official documentation, quickstart guides and documentation for the lsp extensions, to avoid showing outdated information here. This commit is mostly a duplicate of a PR [1] that I made against the rust-analyzer github project. [1]: rust-analyzer/rust-analyzer.github.io#197, rust-analyzer/rust-analyzer.github.io@7ff0113 ma Resolves Issue rust-lang#196: rust-analyzer/rust-analyzer.github.io#196
Closes #186