From 71d2cf67b5ed120a0e31b2c8adb210dd2834242f Mon Sep 17 00:00:00 2001 From: simrat39 Date: Mon, 20 Feb 2023 21:52:40 +0000 Subject: [PATCH] Auto generate docs --- doc/rust-tools.txt | 110 ++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 61 deletions(-) diff --git a/doc/rust-tools.txt b/doc/rust-tools.txt index 6cc7f15..6242870 100644 --- a/doc/rust-tools.txt +++ b/doc/rust-tools.txt @@ -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 @@ -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` @@ -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' @@ -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.
+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({ @@ -82,21 +83,14 @@ Example config: < -USAGE *rust-tools-usage* +USAGE *rust-tools-rust-tools.nvim-usage* Debugging ~ -
- -

debugging

-
- Inlay Hints ~ - ```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 @@ -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 ~ - -`lua -- Command: -- RustRunnables require('rust-tools').runnables.runnables()` +`lua -- Command: -- RustRunnables require('rust-tools').runnables.runnables()`Expand Macros Recursively ~ -Expand Macros Recursively ~ - -`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 ~ - -`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 ~ - 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 ~ - -`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 ~ - -`lua -- Command: -- RustParentModule require'rust-tools'.parent_module.parent_module()` -Join Lines ~ +`lua -- Command: -- RustParentModule require'rust-tools'.parent_module.parent_module()`Join Lines ~ - -`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 @@ -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` -INSPIRATION *rust-tools-inspiration* +INSPIRATION *rust-tools-rust-tools.nvim-inspiration* This plugin draws inspiration from `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 vim:tw=78:ts=8:noet:ft=help:norl: