Nvim :help
pages, generated
from source
using the tree-sitter-vimdoc parser.
:b
prefix), and the buffer local
will take precedence over the global g:
counterpart.g:rustc_path
rustc
will be located in $PATH:let g:rustc_path = $HOME."/bin/rustc"
g:rustc_makeprg_no_percent
rustc
instead of
rustc %
:let g:rustc_makeprg_no_percent = 1
g:rust_conceal
let g:rust_conceal = 1
g:rust_conceal_mod_path
let g:rust_conceal_mod_path = 1
g:rust_conceal_pub
let g:rust_conceal_pub = 1
g:rust_recommended_style
let g:rust_recommended_style = 0
g:rust_bang_comment_leader
/*!
syntax:let g:rust_bang_comment_leader = 1
g:rust_use_custom_ctags_defs
let g:rust_use_custom_ctags_defs = 1
rust.vim/ctags/rust.ctags
into your own ~/.ctags
if you wish
to generate tags files.g:ftplugin_rust_source_path
let g:ftplugin_rust_source_path = $HOME . '/dev/rust'
g:rustfmt_command
let g:rustfmt_command = 'rustfmt'
g:rustfmt_autosave
let g:rustfmt_autosave = 0
g:rustfmt_autosave_if_config_present
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:let g:rustfmt_autosave_if_config_present = 0
rustfmt
only execute on save, on projects
that have rustfmt.toml
configuration.g:rustfmt_fail_silently
let g:rustfmt_fail_silently = 0
g:rustfmt_options
let g:rustfmt_options = ''
g:rustfmt_emit_files
let g:rustfmt_emit_files = 0
g:rust_playpen_url
let g:rust_playpen_url = 'https://play.rust-lang.org/'
g:rust_shortener_url
let g:rust_shortener_url = 'https://is.gd/'
g:rust_clip_command
let g:rust_clip_command = 'xclip -selection clipboard'
g:cargo_makeprg_params
$*
:let g:cargo_makeprg_params = 'build'
g:cargo_shell_command_runner
let g:cargo_shell_command_runner = '!'
rustc
, and cargo
. The latter invokes cargo
in order to
build code, and the former delivers a single edited '.rs' file as a compilation
target directly to the Rust compiler, rustc
.cargo
is the default checker.let g:syntastic_rust_checkers = ['cargo']
g:syntastic_rust_checkers
to a
different value.
g:rust_cargo_avoid_whole_workspace
b:rust_cargo_avoid_whole_workspace
cargo
will be executed
directly in that crate directory instead of in the workspace
directory. Setting 0 prevents this behavior - however be aware that if
you are working in large workspace, Cargo commands may take more time,
plus the Syntastic error list may include all the crates in the
workspace.let g:rust_cargo_avoid_whole_workspace = 0
g:rust_cargo_check_all_targets
b:rust_cargo_check_all_targets
--all-targets
option will be passed to cargo when
Syntastic executes it, allowing the linting of all targets under the
package.
The default is 0.g:rust_cargo_check_all_features
b:rust_cargo_check_all_features
--all-features
option will be passed to cargo when
Syntastic executes it, allowing the linting of all features of the
package.
The default is 0.g:rust_cargo_check_examples
b:rust_cargo_check_examples
--examples
option will be passed to cargo when
Syntastic executes it, to prevent the exclusion of examples from
linting. The examples are normally under the examples/
directory of
the crate.
The default is 0.g:rust_cargo_check_tests
b:rust_cargo_check_tests
--tests
option will be passed to cargo when
Syntastic executes it, to prevent the exclusion of tests from linting.
The tests are normally under the tests/
directory of the crate.
The default is 0.g:rust_cargo_check_benches
b:rust_cargo_check_benches
--benches
option will be passed to cargo when
Syntastic executes it. The benches are normally under the benches/
directory of the crate.
The default is 0.g:rust_keep_autopairs_default
<args>
:Cruntarget
Shortcut for cargo run --bin
or cargo run --example
,
depending on the currently open buffer.:RustFmt
Runs g:rustfmt_command on the current buffer. If
g:rustfmt_options is set then those will be passed to the
executable.:RustFmtRange
Runs g:rustfmt_command with selected range. See
:RustFmt for any other information.:RustPlay
This command will only work if you have web-api.vim installed
(available at https://github.com/mattn/webapi-vim). It sends the
current selection, or if nothing is selected, the entirety of the
current buffer to the Rust playpen, and emits a message with the
shortened URL to the playpen.:RustRun
:RustRun! [rustc-args] [--] [args]
Compiles and runs the current file. If it 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 compiled binary is always placed in a temporary
directory, but is run from the current directory.:RustExpand
:RustExpand! [TYPE] [args]
Expands the current file using --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.--cfg
configurations.rustc --pretty
. Otherwise it will default to
"expanded".: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.: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.: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.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.:tab RustTest
:belowright 16RustTest
:leftabove vert 80RustTest
:RustInfo
Emits debugging info of the Vim Rust plugin.:RustInfoClipboard
Saves debugging info of the Vim Rust plugin to the default
register.:RustInfoToFile
Saves debugging info of the Vim Rust plugin to the given file,
overwriting it.