Skip to content
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

Add a command to open docs for the symbol under the cursor #5917

Merged
merged 17 commits into from
Oct 12, 2020

Conversation

zacps
Copy link
Contributor

@zacps zacps commented Aug 30, 2020

Todo

  • Decide if there should be a default keybind or context menu entry
  • Figure out how to get the documentation path for methods and other non-top-level defs
  • Design the protocol extension. In future we'll probably want parameters for local/remote documentation URLs, so that should maybe be done in this PR?
  • Code organisation
  • Tests

@zacps zacps force-pushed the open-documentation-under-cursor branch from d4b4d2f to b1427c3 Compare August 31, 2020 08:33
crates/rust-analyzer/src/lsp_ext.rs Outdated Show resolved Hide resolved
crates/rust-analyzer/src/lsp_ext.rs Outdated Show resolved Hide resolved
crates/rust-analyzer/src/lsp_ext.rs Outdated Show resolved Hide resolved
crates/rust-analyzer/src/lsp_ext.rs Outdated Show resolved Hide resolved
crates/rust-analyzer/src/lsp_ext.rs Show resolved Hide resolved
editors/code/src/lsp_ext.ts Outdated Show resolved Hide resolved
crates/rust-analyzer/src/handlers.rs Outdated Show resolved Hide resolved
crates/ide/src/lib.rs Outdated Show resolved Hide resolved
crates/hir/src/doc_links.rs Outdated Show resolved Hide resolved
@zacps zacps force-pushed the open-documentation-under-cursor branch 3 times, most recently from 09982d8 to c2aa141 Compare September 5, 2020 05:27
@zacps zacps marked this pull request as ready for review September 5, 2020 22:28
crates/hir/src/code_model.rs Outdated Show resolved Hide resolved
crates/hir/src/code_model.rs Outdated Show resolved Hide resolved
crates/hir_def/src/item_tree.rs Show resolved Hide resolved
crates/ide/src/doc_links.rs Outdated Show resolved Hide resolved
@matklad
Copy link
Member

matklad commented Sep 29, 2020

Status: MethodOwner enum should be removed from hir, and the "let's consider only adt's" logic should be moved to ide layer. Other than that, LGTM!

@zacps zacps force-pushed the open-documentation-under-cursor branch from 40747a0 to 8af1dd7 Compare October 8, 2020 02:23
@zacps zacps force-pushed the open-documentation-under-cursor branch from dfde80e to 3bd4fe9 Compare October 8, 2020 02:50
@zacps
Copy link
Contributor Author

zacps commented Oct 8, 2020

@matklad I've removed MethodOwner

I think this is probably ready now?

@matklad
Copy link
Member

matklad commented Oct 12, 2020

Looks good to me now, thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 12, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants