1
- *rust-tools.txt* For NVIM v0.8.0 Last change: 2023 February 05
1
+ *rust-tools.txt* For NVIM v0.8.0 Last change: 2023 February 20
2
2
3
3
==============================================================================
4
4
Table of Contents *rust-tools-table-of-contents*
5
5
6
6
1. rust-tools.nvim | rust-tools-rust-tools.nvim |
7
- - Quick Links | rust-tools-quick-links |
8
- - Prerequisites | rust-tools-prerequisites |
9
- - Installation | rust-tools-installation |
10
- - Setup | rust-tools-setup |
11
- - Usage | rust-tools-usage |
12
- - Configuration | rust-tools-configuration |
13
- - Related Projects | rust-tools-related-projects |
14
- - Inspiration | rust-tools-inspiration |
7
+ - Quick Links | rust-tools-rust-tools.nvim -quick-links |
8
+ - Prerequisites | rust-tools-rust-tools.nvim -prerequisites |
9
+ - Installation | rust-tools-rust-tools.nvim -installation |
10
+ - Setup | rust-tools-rust-tools.nvim -setup |
11
+ - Usage | rust-tools-rust-tools.nvim -usage |
12
+ - Configuration | rust-tools-rust-tools.nvim -configuration |
13
+ - Related Projects | rust-tools-rust-tools.nvim -related-projects |
14
+ - Inspiration | rust-tools-rust-tools.nvim -inspiration |
15
15
16
16
==============================================================================
17
17
1. rust-tools.nvim *rust-tools-rust-tools.nvim*
18
18
19
19
A plugin to improve your rust experience in neovim.
20
20
21
- QUICK LINKS *rust-tools-quick-links*
21
+
22
+ QUICK LINKS *rust-tools-rust-tools.nvim-quick-links*
22
23
23
24
24
25
- Wiki <https://github.com/simrat39/rust-tools.nvim/wiki >
@@ -29,7 +30,7 @@ QUICK LINKS *rust-tools-quick-links*
29
30
- | rust-tools-usage |
30
31
31
32
32
- PREREQUISITES *rust-tools-prerequisites*
33
+ PREREQUISITES *rust-tools-rust-tools.nvim -prerequisites*
33
34
34
35
35
36
- `neovim 0.7`
@@ -38,11 +39,11 @@ PREREQUISITES *rust-tools-prerequisites*
38
39
- `dot` from `graphviz` (only for crate graph)
39
40
40
41
41
- INSTALLATION *rust-tools-installation*
42
+ INSTALLATION *rust-tools-rust-tools.nvim -installation*
42
43
43
44
using `packer.nvim`
44
45
45
- >
46
+ >lua
46
47
use 'neovim/nvim-lspconfig'
47
48
use 'simrat39/rust-tools.nvim'
48
49
@@ -51,22 +52,22 @@ using `packer.nvim`
51
52
use 'mfussenegger/nvim-dap'
52
53
<
53
54
55
+ Look at the configuration information below to get started.
54
56
55
- Look at the configuration information below to get started. ~
56
57
57
- SETUP *rust-tools-setup*
58
+ SETUP *rust-tools-rust-tools.nvim -setup*
58
59
59
60
This plugin automatically sets up nvim-lspconfig for rust_analyzer for you, so
60
61
don’t do that manually, as it causes conflicts.
61
62
62
- Put this in your init.lua or any lua file that is sourced.<br>
63
+ Put this in your init.lua or any lua file that is sourced.
63
64
64
65
For most people, the defaults are fine, but for advanced configuration, see
65
66
| rust-tools-configuration | .
66
67
67
68
Example config:
68
69
69
- >
70
+ >lua
70
71
local rt = require("rust-tools")
71
72
72
73
rt.setup({
@@ -82,21 +83,14 @@ Example config:
82
83
<
83
84
84
85
85
- USAGE *rust-tools-usage*
86
+ USAGE *rust-tools-rust-tools.nvim -usage*
86
87
87
88
Debugging ~
88
89
89
- <div class="figure">
90
- <img src="https://github.com/simrat39/rust-tools-demos/raw/master/rust-tools-debug.gif " title="fig:"/>
91
- <p class="caption">debugging</p>
92
- </div>
93
-
94
90
Inlay Hints ~
95
91
96
- <img
97
- src='https://github.com/simrat39/rust-tools-demos/raw/master/inlay_hints.png '
98
- title=''/> ```lua – Commands: – RustEnableInlayHints –
99
- RustDisableInlayHints – RustSetInlayHints – RustUnsetInlayHints
92
+ ```lua – Commands: – RustEnableInlayHints – RustDisableInlayHints –
93
+ RustSetInlayHints – RustUnsetInlayHints
100
94
101
95
– Set inlay hints for the current buffer
102
96
require('rust-tools').inlay_hints.set() – Unset inlay hints for the current
@@ -106,74 +100,55 @@ buffer require('rust-tools').inlay_hints.unset()
106
100
require('rust-tools').inlay_hints.enable()
107
101
– Disable inlay hints auto update and unset them for all buffers
108
102
require('rust-tools').inlay_hints.disable()
109
- ```
103
+ ```Runnables ~
110
104
111
- Runnables ~
112
105
113
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/runnables.gif ' title=''/>
114
- `lua -- Command: -- RustRunnables require('rust-tools').runnables.runnables()`
106
+ `lua -- Command: -- RustRunnables require('rust-tools').runnables.runnables()`Expand Macros Recursively ~
115
107
116
- Expand Macros Recursively ~
117
108
118
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/expand_macros_recursively.gif ' title=''/>
119
- `lua -- Command: -- RustExpandMacro require'rust-tools'.expand_macro.expand_macro()`
109
+ `lua -- Command: -- RustExpandMacro require'rust-tools'.expand_macro.expand_macro()`Move Item Up/Down ~
120
110
121
- Move Item Up/Down ~
122
111
123
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/move_item.gif ' title=''/>
124
- `lua -- Command: -- RustMoveItemUp -- RustMoveItemDown local up = true -- true = move up, false = move down require'rust-tools'.move_item.move_item(up)`
112
+ `lua -- Command: -- RustMoveItemUp -- RustMoveItemDown local up = true -- true = move up, false = move down require'rust-tools'.move_item.move_item(up)`Hover Actions ~
125
113
126
- Hover Actions ~
127
114
128
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/hover_actions.gif ' title=''/>
129
115
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.
130
- `lua -- Command: -- RustHoverActions require'rust-tools'.hover_actions.hover_actions()`
131
-
132
- Hover Range ~
116
+ `lua -- Command: -- RustHoverActions require'rust-tools'.hover_actions.hover_actions()`Hover Range ~
133
117
134
118
Note: Requires rust-analyzer version after 2021-08-02. Shows the type in visual mode when hovering.
135
- `lua -- Command: -- RustHoverRange require'rust-tools'.hover_range.hover_range()`
136
-
137
- Open Cargo.toml ~
119
+ `lua -- Command: -- RustHoverRange require'rust-tools'.hover_range.hover_range()`Open Cargo.toml ~
138
120
139
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/open_cargo_toml.gif ' title=''/>
140
- `lua -- Command: -- RustOpenCargo require'rust-tools'.open_cargo_toml.open_cargo_toml()`
141
121
142
- Parent Module ~
122
+ `lua -- Command: -- RustOpenCargo require'rust-tools'.open_cargo_toml.open_cargo_toml()` Parent Module ~
143
123
144
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/parent_module.gif ' title=''/>
145
- `lua -- Command: -- RustParentModule require'rust-tools'.parent_module.parent_module()`
146
124
147
- Join Lines ~
125
+ `lua -- Command: -- RustParentModule require'rust-tools'.parent_module.parent_module()` Join Lines ~
148
126
149
- <img src='https://github.com/simrat39/rust-tools-demos/raw/master/join_lines.gif ' title=''/>
150
- `lua -- Command: -- RustJoinLines require'rust-tools'.join_lines.join_lines()`
151
127
152
- Structural Search Replace ~
128
+ `lua -- Command: -- RustJoinLines require'rust-tools'.join_lines.join_lines()` Structural Search Replace ~
153
129
154
- >
130
+ >lua
155
131
-- Command:
156
132
-- RustSSR [query]
157
133
require'rust-tools'.ssr.ssr(query)
158
134
<
159
135
160
-
161
136
View Crate Graph ~
162
137
163
- >
138
+ >lua
164
139
-- Command:
165
140
-- RustViewCrateGraph [backend [output] ]
166
141
require'rust-tools'.crate_graph.view_crate_graph(backend, output)
167
142
<
168
143
169
144
170
- CONFIGURATION *rust-tools-configuration*
145
+ CONFIGURATION *rust-tools-rust-tools.nvim -configuration*
171
146
172
147
The options shown below are the defaults. You only need to pass the keys to the
173
148
setup function that you want to be changed, because the defaults are applied
174
149
for keys that are not provided.
175
150
176
- >
151
+ >lua
177
152
local opts = {
178
153
tools = { -- rust-tools options
179
154
@@ -353,17 +328,30 @@ for keys that are not provided.
353
328
<
354
329
355
330
356
- RELATED PROJECTS *rust-tools-related-projects*
331
+ RELATED PROJECTS *rust-tools-rust-tools.nvim -related-projects*
357
332
358
333
359
334
- `Saecki/crates.nvim` <https://github.com/Saecki/crates.nvim >
360
335
361
336
362
- INSPIRATION *rust-tools-inspiration*
337
+ INSPIRATION *rust-tools-rust-tools.nvim -inspiration*
363
338
364
339
This plugin draws inspiration from `akinsho/flutter- tools.nvim`
365
340
<https://github.com/akinsho/flutter-tools.nvim >
366
341
342
+ ==============================================================================
343
+ 2. Links *rust-tools-links*
344
+
345
+ 1. *debugging*: https://github.com/simrat39/rust-tools-demos/raw/master/rust-tools-debug.gif
346
+ 2. *inlay hints*: https://github.com/simrat39/rust-tools-demos/raw/master/inlay_hints.png
347
+ 3. *runnables*: https://github.com/simrat39/rust-tools-demos/raw/master/runnables.gif
348
+ 4. *expand macros*: https://github.com/simrat39/rust-tools-demos/raw/master/expand_macros_recursively.gif
349
+ 5. *move items*: https://github.com/simrat39/rust-tools-demos/raw/master/move_item.gif
350
+ 6. *hover actions*: https://github.com/simrat39/rust-tools-demos/raw/master/hover_actions.gif
351
+ 7. *open cargo*: https://github.com/simrat39/rust-tools-demos/raw/master/open_cargo_toml.gif
352
+ 8. *parent module*: https://github.com/simrat39/rust-tools-demos/raw/master/parent_module.gif
353
+ 9. *join lines*: https://github.com/simrat39/rust-tools-demos/raw/master/join_lines.gif
354
+
367
355
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc >
368
356
369
357
vim:tw=78:ts=8:noet:ft=help:norl:
0 commit comments