Skip to content

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

Merged
bors[bot] merged 17 commits into
rust-lang:masterfrom
zacps:open-documentation-under-cursor
Oct 12, 2020
Merged

Add a command to open docs for the symbol under the cursor#5917
bors[bot] merged 17 commits into
rust-lang:masterfrom
zacps:open-documentation-under-cursor

Conversation

@zacps

@zacps zacps commented Aug 30, 2020

Copy link
Copy Markdown
Contributor

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
Comment thread crates/rust-analyzer/src/lsp_ext.rs Outdated
Comment thread crates/rust-analyzer/src/lsp_ext.rs Outdated
Comment thread crates/rust-analyzer/src/lsp_ext.rs Outdated
Comment thread crates/rust-analyzer/src/lsp_ext.rs Outdated
Comment thread crates/rust-analyzer/src/lsp_ext.rs
Comment thread editors/code/src/lsp_ext.ts Outdated
Comment thread crates/rust-analyzer/src/handlers.rs Outdated
Comment thread crates/ide/src/lib.rs Outdated
Comment thread crates/hir/src/doc_links.rs Outdated
@zacps zacps force-pushed the open-documentation-under-cursor branch 3 times, most recently from 09982d8 to c2aa141 Compare September 5, 2020 05:27
Comment thread crates/ide/src/doc_links.rs
@zacps zacps marked this pull request as ready for review September 5, 2020 22:28
Comment thread crates/hir/src/code_model.rs Outdated
Comment thread crates/hir/src/code_model.rs Outdated
Comment thread crates/hir_def/src/item_tree.rs
Comment thread crates/ide/src/doc_links.rs Outdated
@matklad

matklad commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

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

zacps commented Oct 8, 2020

Copy link
Copy Markdown
Contributor Author

@matklad I've removed MethodOwner

I think this is probably ready now?

@matklad

matklad commented Oct 12, 2020

Copy link
Copy Markdown
Contributor

Looks good to me now, thanks!

bors r+

@bors

bors Bot commented Oct 12, 2020

Copy link
Copy Markdown
Contributor

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.

4 participants