Home Explore Blog CI



neovim

7th chunk of `runtime/doc/ft_rust.txt`
bfafced037603994c9fa95db8891ec67e41ea04cfa4695f20000000100000d39
 `--pretty` and displays the
		results in a new split. If the current file has unsaved
		changes, it will be saved first using |:update|. If the
		current file is an unnamed buffer, it will be written to a
		temporary file first.

		The arguments given to |:RustExpand| will be passed to rustc.
		This is largely intended for specifying various `--cfg`
		configurations.

		If ! is specified, the first argument is the expansion type to
		pass to `rustc --pretty` . Otherwise it will default to
		"expanded".

		If |g:rustc_path| is defined, it is used as the path to rustc.
		Otherwise it is assumed rustc can be found in $PATH.

:RustEmitIr [args]                                               *:RustEmitIr*
		Compiles the current file to LLVM IR and displays the results
		in a new split. If the current file has unsaved changes, it
		will be saved first using |:update|. If the current file is an
		unnamed buffer, it will be written to a temporary file first.

		The arguments given to |:RustEmitIr| will be passed to rustc.

		If |g:rustc_path| is defined, it is used as the path to rustc.
		Otherwise it is assumed rustc can be found in $PATH.

:RustEmitAsm [args]                                             *:RustEmitAsm*
		Compiles the current file to assembly and displays the results
		in a new split. If the current file has unsaved changes, it
		will be saved first using |:update|. If the current file is an
		unnamed buffer, it will be written to a temporary file first.

		The arguments given to |:RustEmitAsm| will be passed to rustc.

		If |g:rustc_path| is defined, it is used as the path to rustc.
		Otherwise it is assumed rustc can be found in $PATH.


Running test(s) ~

:[N]RustTest[!] [options]                                       *:RustTest*
		Runs a test under the cursor when the current buffer is in a
		cargo project with "cargo test" command. If the command did
		not find any test function under the cursor, it stops with an
		error message.

		When N is given, adjust the size of the new window to N lines
		or columns.

		When ! is given, runs all tests regardless of current cursor
		position.

		When [options] is given, it is passed to "cargo" command
		arguments.

		When the current buffer is outside cargo project, the command
		runs `rustc --test` command instead of "cargo test" as
		fallback. All tests are run regardless of adding ! since there
		is no way to run specific test function with rustc. [options]
		is passed to `rustc` command arguments in the case.

		Takes optional modifiers (see |<mods>|):  >vim
		    :tab RustTest
		    :belowright 16RustTest
		    :leftabove vert 80RustTest
<
rust.vim Debugging ~

:RustInfo                                                          *:RustInfo*
		Emits debugging info of the Vim Rust plugin.

:RustInfoToClipboard                                      *:RustInfoClipboard*
		Saves debugging info of the Vim Rust plugin to the default
		register.

:RustInfoToFile [filename]                                   *:RustInfoToFile*
		Saves debugging info of the Vim Rust plugin to the given file,
		overwriting it.

==============================================================================
MAPPINGS                                                       *rust-mappings*

This plugin defines mappings for |[[| and |]]| to support hanging indents.


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

Title: Rust Vim Plugin: :RustEmitIr, :RustEmitAsm, :RustTest, Debugging, and Mappings
Summary
This section covers several Vim commands for Rust development. `:RustEmitIr` and `:RustEmitAsm` compile the current file to LLVM IR and assembly, respectively, displaying the results in a new split. `:RustTest` runs tests in the current buffer using `cargo test` or `rustc --test`. Additionally, the plugin provides commands for debugging itself (`:RustInfo`, `:RustInfoToClipboard`, `:RustInfoToFile`). Finally, it defines mappings for `[[` and `]]` to support hanging indents.