Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
simrat39 authored and github-actions[bot] committed Feb 20, 2023
1 parent 6b069c5 commit 71d2cf6
Showing 1 changed file with 49 additions and 61 deletions.
110 changes: 49 additions & 61 deletions doc/rust-tools.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
*rust-tools.txt* For NVIM v0.8.0 Last change: 2023 February 05
*rust-tools.txt* For NVIM v0.8.0 Last change: 2023 February 20

==============================================================================
Table of Contents *rust-tools-table-of-contents*

1. rust-tools.nvim |rust-tools-rust-tools.nvim|
- Quick Links |rust-tools-quick-links|
- Prerequisites |rust-tools-prerequisites|
- Installation |rust-tools-installation|
- Setup |rust-tools-setup|
- Usage |rust-tools-usage|
- Configuration |rust-tools-configuration|
- Related Projects |rust-tools-related-projects|
- Inspiration |rust-tools-inspiration|
- Quick Links |rust-tools-rust-tools.nvim-quick-links|
- Prerequisites |rust-tools-rust-tools.nvim-prerequisites|
- Installation |rust-tools-rust-tools.nvim-installation|
- Setup |rust-tools-rust-tools.nvim-setup|
- Usage |rust-tools-rust-tools.nvim-usage|
- Configuration |rust-tools-rust-tools.nvim-configuration|
- Related Projects |rust-tools-rust-tools.nvim-related-projects|
- Inspiration |rust-tools-rust-tools.nvim-inspiration|

==============================================================================
1. rust-tools.nvim *rust-tools-rust-tools.nvim*

A plugin to improve your rust experience in neovim.

QUICK LINKS *rust-tools-quick-links*

QUICK LINKS *rust-tools-rust-tools.nvim-quick-links*


- Wiki <https://github.com/simrat39/rust-tools.nvim/wiki>
Expand All @@ -29,7 +30,7 @@ QUICK LINKS *rust-tools-quick-links*
- |rust-tools-usage|


PREREQUISITES *rust-tools-prerequisites*
PREREQUISITES *rust-tools-rust-tools.nvim-prerequisites*


- `neovim 0.7`
Expand All @@ -38,11 +39,11 @@ PREREQUISITES *rust-tools-prerequisites*
- `dot` from `graphviz` (only for crate graph)


INSTALLATION *rust-tools-installation*
INSTALLATION *rust-tools-rust-tools.nvim-installation*

using `packer.nvim`

>
>lua
use 'neovim/nvim-lspconfig'
use 'simrat39/rust-tools.nvim'

Expand All @@ -51,22 +52,22 @@ using `packer.nvim`
use 'mfussenegger/nvim-dap'
<

Look at the configuration information below to get started.

Look at the configuration information below to get started. ~

SETUP *rust-tools-setup*
SETUP *rust-tools-rust-tools.nvim-setup*

This plugin automatically sets up nvim-lspconfig for rust_analyzer for you, so
don’t do that manually, as it causes conflicts.

Put this in your init.lua or any lua file that is sourced.<br>
Put this in your init.lua or any lua file that is sourced.

For most people, the defaults are fine, but for advanced configuration, see
|rust-tools-configuration|.

Example config:

>
>lua
local rt = require("rust-tools")

rt.setup({
Expand All @@ -82,21 +83,14 @@ Example config:
<


USAGE *rust-tools-usage*
USAGE *rust-tools-rust-tools.nvim-usage*

Debugging ~

<div class="figure">
<img src="https://github.com/simrat39/rust-tools-demos/raw/master/rust-tools-debug.gif" title="fig:"/>
<p class="caption">debugging</p>
</div>

Inlay Hints ~

<img
src='https://github.com/simrat39/rust-tools-demos/raw/master/inlay_hints.png'
title=''/> ```lua – Commands: – RustEnableInlayHints –
RustDisableInlayHints – RustSetInlayHints – RustUnsetInlayHints
```lua – Commands: – RustEnableInlayHints – RustDisableInlayHints –
RustSetInlayHints – RustUnsetInlayHints

– Set inlay hints for the current buffer
require('rust-tools').inlay_hints.set() – Unset inlay hints for the current
Expand All @@ -106,74 +100,55 @@ buffer require('rust-tools').inlay_hints.unset()
require('rust-tools').inlay_hints.enable()
– Disable inlay hints auto update and unset them for all buffers
require('rust-tools').inlay_hints.disable()
```
```Runnables ~

Runnables ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/runnables.gif' title=''/>
`lua -- Command: -- RustRunnables require('rust-tools').runnables.runnables()`
`lua -- Command: -- RustRunnables require('rust-tools').runnables.runnables()`Expand Macros Recursively ~

Expand Macros Recursively ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/expand_macros_recursively.gif' title=''/>
`lua -- Command: -- RustExpandMacro require'rust-tools'.expand_macro.expand_macro()`
`lua -- Command: -- RustExpandMacro require'rust-tools'.expand_macro.expand_macro()`Move Item Up/Down ~

Move Item Up/Down ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/move_item.gif' title=''/>
`lua -- Command: -- RustMoveItemUp -- RustMoveItemDown local up = true -- true = move up, false = move down require'rust-tools'.move_item.move_item(up)`
`lua -- Command: -- RustMoveItemUp -- RustMoveItemDown local up = true -- true = move up, false = move down require'rust-tools'.move_item.move_item(up)`Hover Actions ~

Hover Actions ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/hover_actions.gif' title=''/>
Note: To activate hover actions, run the command twice (or your hover keymap if you have `hover_with_actions` set to true AND are using `vim.lsp.buf.hover()`). This will move you into the window, then press enter on the selection you want. Alternatively, you can set `auto_focus` to true in your config and you will automatically enter the hover actions window.
`lua -- Command: -- RustHoverActions require'rust-tools'.hover_actions.hover_actions()`

Hover Range ~
`lua -- Command: -- RustHoverActions require'rust-tools'.hover_actions.hover_actions()`Hover Range ~

Note: Requires rust-analyzer version after 2021-08-02. Shows the type in visual mode when hovering.
`lua -- Command: -- RustHoverRange require'rust-tools'.hover_range.hover_range()`

Open Cargo.toml ~
`lua -- Command: -- RustHoverRange require'rust-tools'.hover_range.hover_range()`Open Cargo.toml ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/open_cargo_toml.gif' title=''/>
`lua -- Command: -- RustOpenCargo require'rust-tools'.open_cargo_toml.open_cargo_toml()`

Parent Module ~
`lua -- Command: -- RustOpenCargo require'rust-tools'.open_cargo_toml.open_cargo_toml()`Parent Module ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/parent_module.gif' title=''/>
`lua -- Command: -- RustParentModule require'rust-tools'.parent_module.parent_module()`

Join Lines ~
`lua -- Command: -- RustParentModule require'rust-tools'.parent_module.parent_module()`Join Lines ~

<img src='https://github.com/simrat39/rust-tools-demos/raw/master/join_lines.gif' title=''/>
`lua -- Command: -- RustJoinLines require'rust-tools'.join_lines.join_lines()`

Structural Search Replace ~
`lua -- Command: -- RustJoinLines require'rust-tools'.join_lines.join_lines()`Structural Search Replace ~

>
>lua
-- Command:
-- RustSSR [query]
require'rust-tools'.ssr.ssr(query)
<


View Crate Graph ~

>
>lua
-- Command:
-- RustViewCrateGraph [backend [output]]
require'rust-tools'.crate_graph.view_crate_graph(backend, output)
<


CONFIGURATION *rust-tools-configuration*
CONFIGURATION *rust-tools-rust-tools.nvim-configuration*

The options shown below are the defaults. You only need to pass the keys to the
setup function that you want to be changed, because the defaults are applied
for keys that are not provided.

>
>lua
local opts = {
tools = { -- rust-tools options

Expand Down Expand Up @@ -353,17 +328,30 @@ for keys that are not provided.
<


RELATED PROJECTS *rust-tools-related-projects*
RELATED PROJECTS *rust-tools-rust-tools.nvim-related-projects*


- `Saecki/crates.nvim` <https://github.com/Saecki/crates.nvim>


INSPIRATION *rust-tools-inspiration*
INSPIRATION *rust-tools-rust-tools.nvim-inspiration*

This plugin draws inspiration from `akinsho/flutter-tools.nvim`
<https://github.com/akinsho/flutter-tools.nvim>

==============================================================================
2. Links *rust-tools-links*

1. *debugging*: https://github.com/simrat39/rust-tools-demos/raw/master/rust-tools-debug.gif
2. *inlay hints*: https://github.com/simrat39/rust-tools-demos/raw/master/inlay_hints.png
3. *runnables*: https://github.com/simrat39/rust-tools-demos/raw/master/runnables.gif
4. *expand macros*: https://github.com/simrat39/rust-tools-demos/raw/master/expand_macros_recursively.gif
5. *move items*: https://github.com/simrat39/rust-tools-demos/raw/master/move_item.gif
6. *hover actions*: https://github.com/simrat39/rust-tools-demos/raw/master/hover_actions.gif
7. *open cargo*: https://github.com/simrat39/rust-tools-demos/raw/master/open_cargo_toml.gif
8. *parent module*: https://github.com/simrat39/rust-tools-demos/raw/master/parent_module.gif
9. *join lines*: https://github.com/simrat39/rust-tools-demos/raw/master/join_lines.gif

Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

vim:tw=78:ts=8:noet:ft=help:norl:

0 comments on commit 71d2cf6

Please sign in to comment.