Skip to content

Commit

Permalink
docs(vimdoc): add missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Dec 18, 2024
1 parent 30889ef commit caadae7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,6 @@ vim.keymap.set(
vim.cmd.RustLsp { 'hover', 'actions' }
```

By default, this plugin replaces Neovim's built-in hover handler with hover
actions, so you can also use `vim.lsp.buf.hover()`.

You can invoke a hover action by switching to the hover window and entering `<CR>`
on the respective line, or with a keymap for the `<Plug>RustHoverAction` mapping,
which accepts a `<count>` prefix as the (1-based) index of the hover action to invoke.
Expand Down
6 changes: 6 additions & 0 deletions doc/rustaceanvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ It accepts the following subcommands:
You can modify these by defining `<Plug>rustaceanvim.code_action.confirm` or
`<Plug>rustaceanvim.code_action.quit` mappings.
'hover {actions|range}' - Hover actions, or hover over visually selected range.
You can invoke a hover action by switching to the hover window and entering `<CR>`
on the respective line, or with a keymap for the `<Plug>RustHoverAction` mapping,
which accepts a `<count>` prefix as the (1-based) index of the hover action to invoke.

For example, if you set the keymap: `vim.keymap.set('n', '<space>a', '<Plug>RustHoverAction')`,
you can invoke the third hover action with `3<space>a`.
'explainError {cycle?|current?}' - Display a hover window with explanations form the Rust error index.
- If called with |cycle| or no args:
Like |vim.diagnostic.goto_next|,
Expand Down
6 changes: 6 additions & 0 deletions lua/rustaceanvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
--- You can modify these by defining `<Plug>rustaceanvim.code_action.confirm` or
--- `<Plug>rustaceanvim.code_action.quit` mappings.
--- 'hover {actions|range}' - Hover actions, or hover over visually selected range.
--- You can invoke a hover action by switching to the hover window and entering `<CR>`
--- on the respective line, or with a keymap for the `<Plug>RustHoverAction` mapping,
--- which accepts a `<count>` prefix as the (1-based) index of the hover action to invoke.
---
--- For example, if you set the keymap: `vim.keymap.set('n', '<space>a', '<Plug>RustHoverAction')`,
--- you can invoke the third hover action with `3<space>a`.
--- 'explainError {cycle?|current?}' - Display a hover window with explanations form the Rust error index.
--- - If called with |cycle| or no args:
--- Like |vim.diagnostic.goto_next|,
Expand Down

0 comments on commit caadae7

Please sign in to comment.