Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/ft_rust.txt`
d5292375d7d475824c06d7cbcf4eb38972ada63301f804730000000100000fa4
 are folded. All folds are open by
			default.
	2		Braced blocks are folded. 'foldlevel' is left at the
			global value (all folds are closed by default).

						  *g:rust_bang_comment_leader*
g:rust_bang_comment_leader ~
	Set this option to 1 to preserve the leader on multi-line doc comments
	using the `/*!` syntax: >vim
	    let g:rust_bang_comment_leader = 1
<

                                                *g:rust_use_custom_ctags_defs*
g:rust_use_custom_ctags_defs ~
	Set this option to 1 if you have customized ctags definitions for Rust
	and do not wish for those included with rust.vim to be used: >vim
	    let g:rust_use_custom_ctags_defs = 1
<

	NOTE: rust.vim's built-in definitions are only used for the Tagbar Vim
	plugin, if you have it installed, AND if Universal Ctags is not
	detected. This is because Universal Ctags already has built-in
	support for Rust when used with Tagbar.

	Also, note that when using ctags other than Universal Ctags, it is not
	automatically used when generating |tags| files that Vim can use to
	navigate to definitions across different source files. Feel free to
	copy `rust.vim/ctags/rust.ctags` into your own `~/.ctags` if you wish
	to generate |tags| files.

                                                 *g:ftplugin_rust_source_path*
g:ftplugin_rust_source_path ~
	Set this option to a path that should be prepended to 'path' for Rust
	source files: >vim
	    let g:ftplugin_rust_source_path = $HOME . '/dev/rust'
<

						       *g:rustfmt_command*
g:rustfmt_command ~
	Set this option to the name of the "rustfmt" executable in your $PATH. If
	not specified it defaults to "rustfmt" : >vim
	    let g:rustfmt_command = 'rustfmt'
<
						       *g:rustfmt_autosave*
g:rustfmt_autosave ~
	Set this option to 1 to run |:RustFmt| automatically when saving a
	buffer. If not specified it defaults to 0 : >vim
	    let g:rustfmt_autosave = 0
<
	There is also a buffer-local b:rustfmt_autosave that can be set for
	the same purpose, and can override the global setting.

                                        *g:rustfmt_autosave_if_config_present*
g:rustfmt_autosave_if_config_present ~
	Set this option to 1 to have *b:rustfmt_autosave* be set automatically
	if a `rustfmt.toml` file is present in any parent directly leading to
	the file being edited. If not set, default to 0: >vim
	    let g:rustfmt_autosave_if_config_present = 0
<
	This is useful to have `rustfmt` only execute on save, on projects
	that have `rustfmt.toml` configuration.

	There is also a buffer-local b:rustfmt_autosave_if_config_present
	that can be set for the same purpose, which can overrides the global
	setting.

						       *g:rustfmt_fail_silently*
g:rustfmt_fail_silently ~
	Set this option to 1 to prevent "rustfmt" from populating the
	|location-list| with errors. If not specified it defaults to 0: >vim
	    let g:rustfmt_fail_silently = 0
<
						       *g:rustfmt_options*
g:rustfmt_options ~
	Set this option to a string of options to pass to "rustfmt". The
	write-mode is already set to "overwrite". If not specified it
	defaults to '' : >vim
	    let g:rustfmt_options = ''
<
                                                       *g:rustfmt_emit_files*
g:rustfmt_emit_files ~
	If not specified rust.vim tries to detect the right parameter to
	pass to rustfmt based on its reported version. Otherwise, it
	determines whether to run rustfmt with '--emit=files' (when 1 is
	provided) instead of '--write-mode=overwrite'. >vim
	    let g:rustfmt_emit_files = 0
<

							  *g:rust_playpen_url*
g:rust_playpen_url ~
	Set this option to override the url for the playpen to use: >vim
	    let g:rust_playpen_url = 'https://play.rust-lang.org/'
<

							*g:rust_shortener_url*
g:rust_shortener_url ~
	Set this option to override the url for the url shortener: >vim
	    let g:rust_shortener_url = 'https://is.gd/'
<
                                                        *g:rust_clip_command*
g:rust_clip_command ~
	Set this option to the command used in your

Title: Rust Vim Plugin: More Settings
Summary
This section continues the configuration settings for the rust.vim plugin. It covers options like preserving comment leaders, using custom ctags definitions, prepending paths to 'path' for Rust source files, configuring rustfmt integration (command, autosave behavior, and options), customizing the Rust Playground URL and URL shortener, and setting the command for copying text to the clipboard. It details how users can fine-tune the plugin's behavior for code formatting, navigation, and integration with external tools.