diff --git a/book/src/keymap.md b/book/src/keymap.md index 5ece2afc6..60ad82550 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -290,7 +290,7 @@ This layer is a kludge of mappings, mostly pickers. | `g` | Open changed file picker | `changed_file_picker` | | `G` | Debug (experimental) | N/A | | `k` | Show documentation for item under cursor in a [popup](#popup) (**LSP**) | `hover` | -| `K` | Show documentation for item under cursor in a new buffer (**LSP**) | `hover_dump` | +| `K` | Go to documentation for item under cursor in a new buffer (**LSP**) | `goto_hover` | | `s` | Open document symbol picker (**LSP**) | `symbol_picker` | | `S` | Open workspace symbol picker (**LSP**) | `workspace_symbol_picker` | | `d` | Open document diagnostics picker (**LSP**) | `diagnostics_picker` | diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 2be766945..f813fe8e6 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -504,7 +504,7 @@ impl MappableCommand { remove_primary_selection, "Remove primary selection", completion, "Invoke completion popup", hover, "Show docs for item under cursor", - hover_dump, "Show docs for item under cursor in a new buffer", + goto_hover, "Show docs for item under cursor in a new buffer", toggle_comments, "Comment/uncomment selections", toggle_line_comments, "Line comment/uncomment selections", toggle_block_comments, "Block comment/uncomment selections", diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 2162996ee..5e16c71e3 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -1078,7 +1078,7 @@ fn hover_impl(cx: &mut Context, hover_action: HoverDisplay) { } HoverDisplay::File => { editor.new_file_from_document( - Action::VerticalSplit, + Action::Replace, Document::from( Rope::from(hover.content_string()), None, @@ -1100,7 +1100,7 @@ pub fn hover(cx: &mut Context) { hover_impl(cx, HoverDisplay::Popup) } -pub fn hover_dump(cx: &mut Context) { +pub fn goto_hover(cx: &mut Context) { hover_impl(cx, HoverDisplay::File) } diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs index 361fafe2e..af3e3f053 100644 --- a/helix-term/src/keymap/default.rs +++ b/helix-term/src/keymap/default.rs @@ -283,7 +283,7 @@ pub fn default() -> HashMap { "R" => replace_selections_with_clipboard, "/" => global_search, "k" => hover, - "K" => hover_dump, + "K" => goto_hover, "r" => rename_symbol, "h" => select_references_to_symbol_under_cursor, "c" => toggle_comments,