Mercurial > vim
annotate runtime/doc/ft_rust.txt @ 34500:4da97f213d15 v9.1.0156
patch 9.1.0156: Make 'wfb' failing to split still report E1513
Commit: https://github.com/vim/vim/commit/769eb2d0c3614f9ea6fffa82329558f1a4af384f
Author: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Date: Thu Mar 7 21:37:50 2024 +0100
patch 9.1.0156: Make 'wfb' failing to split still report E1513
Problem: may not be clear why failing to split causes an ":Xdo" command
to abort if 'wfb' is set.
Solution: do not return immediately if win_split fails, so E1513 is
still given. Expect both errors in the test. Also fix tests to
pass CI.
(Sean Dewar)
closes: #14152
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 07 Mar 2024 21:45:09 +0100 |
parents | c1074a41895e |
children |
rev | line source |
---|---|
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
1 *ft_rust.txt* Filetype plugin for Rust |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 ============================================================================== |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
4 CONTENTS *rust* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
6 1. Introduction |rust-intro| |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
7 2. Settings |rust-settings| |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
8 3. Commands |rust-commands| |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
9 4. Mappings |rust-mappings| |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 ============================================================================== |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
12 INTRODUCTION *rust-intro* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 This plugin provides syntax and supporting functionality for the Rust |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
15 filetype. It requires Vim 8 or higher for full functionality. Some commands |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
16 will not work on earlier versions. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 ============================================================================== |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
19 SETTINGS *rust-settings* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 This plugin has a few variables you can define in your vimrc that change the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 behavior of the plugin. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
24 Some variables can be set buffer local (`:b` prefix), and the buffer local |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
25 will take precedence over the global `g:` counterpart. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
26 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
27 *g:rustc_path* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 g:rustc_path~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 Set this option to the path to rustc for use in the |:RustRun| and |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 |:RustExpand| commands. If unset, "rustc" will be located in $PATH: > |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
31 let g:rustc_path = $HOME."/bin/rustc" |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
34 *g:rustc_makeprg_no_percent* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 g:rustc_makeprg_no_percent~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 Set this option to 1 to have 'makeprg' default to "rustc" instead of |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 "rustc %": > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 let g:rustc_makeprg_no_percent = 1 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
41 *g:rust_conceal* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 g:rust_conceal~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 Set this option to turn on the basic |conceal| support: > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 let g:rust_conceal = 1 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
47 *g:rust_conceal_mod_path* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 g:rust_conceal_mod_path~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 Set this option to turn on |conceal| for the path connecting token |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 "::": > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 let g:rust_conceal_mod_path = 1 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
54 *g:rust_conceal_pub* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 g:rust_conceal_pub~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 Set this option to turn on |conceal| for the "pub" token: > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 let g:rust_conceal_pub = 1 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
60 *g:rust_recommended_style* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 g:rust_recommended_style~ |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
62 Set this option to enable vim indentation and textwidth settings to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
63 conform to style conventions of the rust standard library (i.e. use 4 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
64 spaces for indents and sets 'textwidth' to 99). This option is enabled |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 by default. To disable it: > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 let g:rust_recommended_style = 0 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
69 *g:rust_fold* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 g:rust_fold~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 Set this option to turn on |folding|: > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 let g:rust_fold = 1 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 Value Effect ~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 0 No folding |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 1 Braced blocks are folded. All folds are open by |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 default. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 2 Braced blocks are folded. 'foldlevel' is left at the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 global value (all folds are closed by default). |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
81 *g:rust_bang_comment_leader* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 g:rust_bang_comment_leader~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 Set this option to 1 to preserve the leader on multi-line doc comments |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 using the /*! syntax: > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 let g:rust_bang_comment_leader = 1 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
88 *g:rust_use_custom_ctags_defs* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
89 g:rust_use_custom_ctags_defs~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
90 Set this option to 1 if you have customized ctags definitions for Rust |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
91 and do not wish for those included with rust.vim to be used: > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
92 let g:rust_use_custom_ctags_defs = 1 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
93 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
94 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
95 NOTE: rust.vim's built-in definitions are only used for the Tagbar Vim |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
96 plugin, if you have it installed, AND if Universal Ctags is not |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
97 detected. This is because Universal Ctags already has built-in |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
98 support for Rust when used with Tagbar. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
99 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
100 Also, note that when using ctags other than Universal Ctags, it is not |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
101 automatically used when generating |tags| files that Vim can use to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
102 navigate to definitions across different source files. Feel free to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
103 copy `rust.vim/ctags/rust.ctags` into your own `~/.ctags` if you wish |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
104 to generate |tags| files. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
105 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
106 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
107 *g:ftplugin_rust_source_path* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 g:ftplugin_rust_source_path~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 Set this option to a path that should be prepended to 'path' for Rust |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 source files: > |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
111 let g:ftplugin_rust_source_path = $HOME.'/dev/rust' |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
114 *g:rustfmt_command* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 g:rustfmt_command~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 Set this option to the name of the 'rustfmt' executable in your $PATH. If |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 not specified it defaults to 'rustfmt' : > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 let g:rustfmt_command = 'rustfmt' |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 < |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
120 *g:rustfmt_autosave* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 g:rustfmt_autosave~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 Set this option to 1 to run |:RustFmt| automatically when saving a |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 buffer. If not specified it defaults to 0 : > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 let g:rustfmt_autosave = 0 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 < |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
126 There is also a buffer-local b:rustfmt_autosave that can be set for |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
127 the same purpose, and can override the global setting. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
128 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
129 *g:rustfmt_autosave_if_config_present* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
130 g:rustfmt_autosave_if_config_present~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
131 Set this option to 1 to have *b:rustfmt_autosave* be set automatically |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
132 if a `rustfmt.toml` file is present in any parent directly leading to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
133 the file being edited. If not set, default to 0: > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
134 let g:rustfmt_autosave_if_config_present = 0 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
135 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
136 This is useful to have `rustfmt` only execute on save, on projects |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
137 that have `rustfmt.toml` configuration. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
138 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
139 There is also a buffer-local b:rustfmt_autosave_if_config_present |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
140 that can be set for the same purpose, which can overrides the global |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
141 setting. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
142 *g:rustfmt_fail_silently* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 g:rustfmt_fail_silently~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 Set this option to 1 to prevent 'rustfmt' from populating the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 |location-list| with errors. If not specified it defaults to 0: > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 let g:rustfmt_fail_silently = 0 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 < |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
148 *g:rustfmt_options* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 g:rustfmt_options~ |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 Set this option to a string of options to pass to 'rustfmt'. The |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 write-mode is already set to 'overwrite'. If not specified it |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 defaults to '' : > |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 let g:rustfmt_options = '' |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 < |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
155 *g:rustfmt_emit_files* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
156 g:rustfmt_emit_files~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
157 If not specified rust.vim tries to detect the right parameter to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
158 pass to rustfmt based on its reported version. Otherwise, it |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
159 determines whether to run rustfmt with '--emit=files' (when 1 is |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
160 provided) instead of '--write-mode=overwrite'. > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
161 let g:rustfmt_emit_files = 0 |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
162 |
34056
c1074a41895e
runtime(doc): add missing help tags
Christian Brabandt <cb@256bit.org>
parents:
33336
diff
changeset
|
163 < |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
164 *g:rust_playpen_url* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 g:rust_playpen_url~ |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
166 Set this option to override the url for the playpen to use: > |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 let g:rust_playpen_url = 'https://play.rust-lang.org/' |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
169 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
170 *g:rust_shortener_url* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
171 g:rust_shortener_url~ |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
172 Set this option to override the url for the url shortener: > |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
173 let g:rust_shortener_url = 'https://is.gd/' |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
174 < |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
175 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
176 *g:rust_clip_command* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
177 g:rust_clip_command~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
178 Set this option to the command used in your OS to copy the Rust Play |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
179 url to the clipboard: > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
180 let g:rust_clip_command = 'xclip -selection clipboard' |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
181 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
182 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
183 *g:cargo_makeprg_params* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
184 g:cargo_makeprg_params~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
185 Set this option to the string of parameters to pass to cargo. If not |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
186 specified it defaults to '$*' : > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
187 let g:cargo_makeprg_params = 'build' |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
188 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
189 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
190 *g:cargo_shell_command_runner* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
191 g:cargo_shell_command_runner~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
192 Set this option to change how to run shell commands for cargo commands |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
193 |:Cargo|, |:Cbuild|, |:Crun|, ... |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
194 By default, |:terminal| is used to run shell command in terminal window |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
195 asynchronously. But if you prefer |:!| for running the commands, it can |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
196 be specified: > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
197 let g:cargo_shell_command_runner = '!' |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
198 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
199 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
200 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
201 Integration with Syntastic *rust-syntastic* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
202 -------------------------- |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
203 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
204 This plugin automatically integrates with the Syntastic checker. There are two |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
205 checkers provided: 'rustc', and 'cargo'. The latter invokes 'Cargo' in order to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
206 build code, and the former delivers a single edited '.rs' file as a compilation |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
207 target directly to the Rust compiler, `rustc`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
208 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
209 Because Cargo is almost exclusively being used for building Rust code these |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
210 days, 'cargo' is the default checker. > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
211 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
212 let g:syntastic_rust_checkers = ['cargo'] |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
213 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
214 If you would like to change it, you can set `g:syntastic_rust_checkers` to a |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
215 different value. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
216 *g:rust_cargo_avoid_whole_workspace* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
217 *b:rust_cargo_avoid_whole_workspace* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
218 g:rust_cargo_avoid_whole_workspace~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
219 When editing a crate that is part of a Cargo workspace, and this |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
220 option is set to 1 (the default), then 'cargo' will be executed |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
221 directly in that crate directory instead of in the workspace |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
222 directory. Setting 0 prevents this behavior - however be aware that if |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
223 you are working in large workspace, Cargo commands may take more time, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
224 plus the Syntastic error list may include all the crates in the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
225 workspace. > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
226 let g:rust_cargo_avoid_whole_workspace = 0 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
227 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
228 *g:rust_cargo_check_all_targets* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
229 *b:rust_cargo_check_all_targets* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
230 g:rust_cargo_check_all_targets~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
231 When set to 1, the `--all-targets` option will be passed to cargo when |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
232 Syntastic executes it, allowing the linting of all targets under the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
233 package. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
234 The default is 0. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
235 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
236 *g:rust_cargo_check_all_features* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
237 *b:rust_cargo_check_all_features* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
238 g:rust_cargo_check_all_features~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
239 When set to 1, the `--all-features` option will be passed to cargo when |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
240 Syntastic executes it, allowing the linting of all features of the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
241 package. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
242 The default is 0. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
243 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
244 *g:rust_cargo_check_examples* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
245 *b:rust_cargo_check_examples* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
246 g:rust_cargo_check_examples~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
247 When set to 1, the `--examples` option will be passed to cargo when |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
248 Syntastic executes it, to prevent the exclusion of examples from |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
249 linting. The examples are normally under the `examples/` directory of |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
250 the crate. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
251 The default is 0. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
252 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
253 *g:rust_cargo_check_tests* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
254 *b:rust_cargo_check_tests* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
255 g:rust_cargo_check_tests~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
256 When set to 1, the `--tests` option will be passed to cargo when |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
257 Syntastic executes it, to prevent the exclusion of tests from linting. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
258 The tests are normally under the `tests/` directory of the crate. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
259 The default is 0. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
260 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
261 *g:rust_cargo_check_benches* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
262 *b:rust_cargo_check_benches* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
263 g:rust_cargo_check_benches~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
264 When set to 1, the `--benches` option will be passed to cargo when |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
265 Syntastic executes it. The benches are normally under the `benches/` |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
266 directory of the crate. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
267 The default is 0. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
268 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
269 Integration with auto-pairs *rust-auto-pairs* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
270 --------------------------- |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
271 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
272 This plugin automatically configures the auto-pairs plugin not to duplicate |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
273 single quotes, which are used more often for lifetime annotations than for |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
274 single character literals. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
275 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
276 *g:rust_keep_autopairs_default* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
277 g:rust_keep_autopairs_default~ |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
278 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
279 Don't override auto-pairs default for the Rust filetype. The default |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
280 is 0. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
281 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
282 ============================================================================== |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
283 COMMANDS *rust-commands* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
284 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
285 Invoking Cargo |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
286 -------------- |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
287 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
288 This plug defines very simple shortcuts for invoking Cargo from with Vim. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
289 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
290 :Cargo <args> *:Cargo* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
291 Runs 'cargo' with the provided arguments. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
292 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
293 :Cbuild <args> *:Cbuild* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
294 Shortcut for 'cargo build`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
295 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
296 :Cclean <args> *:Cclean* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
297 Shortcut for 'cargo clean`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
298 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
299 :Cdoc <args> *:Cdoc* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
300 Shortcut for 'cargo doc`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
301 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
302 :Cinit <args> *:Cinit* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
303 Shortcut for 'cargo init`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
304 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
305 :Crun <args> *:Crun* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
306 Shortcut for 'cargo run`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
307 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
308 :Ctest <args> *:Ctest* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
309 Shortcut for 'cargo test`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
310 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
311 :Cupdate <args> *:Cupdate* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
312 Shortcut for 'cargo update`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
313 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
314 :Cbench <args> *:Cbench* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
315 Shortcut for 'cargo bench`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
316 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
317 :Csearch <args> *:Csearch* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
318 Shortcut for 'cargo search`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
319 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
320 :Cpublish <args> *:Cpublish* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
321 Shortcut for 'cargo publish`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
322 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
323 :Cinstall <args> *:Cinstall* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
324 Shortcut for 'cargo install`. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
325 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
326 :Cruntarget <args> *:Cruntarget* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
327 Shortcut for 'cargo run --bin' or 'cargo run --example', |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
328 depending on the currently open buffer. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
329 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
330 Formatting |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
331 ---------- |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
332 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
333 :RustFmt *:RustFmt* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
334 Runs |g:rustfmt_command| on the current buffer. If |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
335 |g:rustfmt_options| is set then those will be passed to the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
336 executable. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
337 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
338 If |g:rustfmt_fail_silently| is 0 (the default) then it |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
339 will populate the |location-list| with the errors from |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
340 |g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
341 then it will not populate the |location-list|. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
342 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
343 :RustFmtRange *:RustFmtRange* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
344 Runs |g:rustfmt_command| with selected range. See |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
345 |:RustFmt| for any other information. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
346 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
347 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
348 Playpen integration |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
349 ------------------- |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
350 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
351 :RustPlay *:RustPlay* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
352 This command will only work if you have web-api.vim installed |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
353 (available at https://github.com/mattn/webapi-vim). It sends the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
354 current selection, or if nothing is selected, the entirety of the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
355 current buffer to the Rust playpen, and emits a message with the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
356 shortened URL to the playpen. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
357 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
358 |g:rust_playpen_url| is the base URL to the playpen, by default |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
359 "https://play.rust-lang.org/". |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
360 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
361 |g:rust_shortener_url| is the base url for the shorterner, by |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
362 default "https://is.gd/" |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
363 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
364 |g:rust_clip_command| is the command to run to copy the |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
365 playpen url to the clipboard of your system. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
366 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
367 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
368 Evaluation of a single Rust file |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
369 -------------------------------- |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
370 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
371 NOTE: These commands are useful only when working with standalone Rust files, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
372 which is usually not the case for common Rust development. If you wish to |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
373 building Rust crates from with Vim can should use Vim's make, Syntastic, or |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
374 functionality from other plugins. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
375 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
376 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
377 :RustRun [args] *:RustRun* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
378 :RustRun! [rustc-args] [--] [args] |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
379 Compiles and runs the current file. If it has unsaved changes, |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
380 it will be saved first using |:update|. If the current file is |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
381 an unnamed buffer, it will be written to a temporary file |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
382 first. The compiled binary is always placed in a temporary |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
383 directory, but is run from the current directory. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
384 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
385 The arguments given to |:RustRun| will be passed to the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
386 compiled binary. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
387 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
388 If ! is specified, the arguments are passed to rustc instead. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
389 A "--" argument will separate the rustc arguments from the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
390 arguments passed to the binary. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
391 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
392 If |g:rustc_path| is defined, it is used as the path to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
393 Otherwise it is assumed rustc can be found in $PATH. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
394 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
395 :RustExpand [args] *:RustExpand* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
396 :RustExpand! [TYPE] [args] |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
397 Expands the current file using --pretty and displays the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
398 results in a new split. If the current file has unsaved |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
399 changes, it will be saved first using |:update|. If the |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
400 current file is an unnamed buffer, it will be written to a |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
401 temporary file first. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
402 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
403 The arguments given to |:RustExpand| will be passed to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
404 This is largely intended for specifying various --cfg |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
405 configurations. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
406 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
407 If ! is specified, the first argument is the expansion type to |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
408 pass to rustc --pretty. Otherwise it will default to |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
409 "expanded". |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
410 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
411 If |g:rustc_path| is defined, it is used as the path to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
412 Otherwise it is assumed rustc can be found in $PATH. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
413 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
414 :RustEmitIr [args] *:RustEmitIr* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
415 Compiles the current file to LLVM IR and displays the results |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
416 in a new split. If the current file has unsaved changes, it |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
417 will be saved first using |:update|. If the current file is an |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
418 unnamed buffer, it will be written to a temporary file first. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
419 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
420 The arguments given to |:RustEmitIr| will be passed to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
421 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
422 If |g:rustc_path| is defined, it is used as the path to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
423 Otherwise it is assumed rustc can be found in $PATH. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
424 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
425 :RustEmitAsm [args] *:RustEmitAsm* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
426 Compiles the current file to assembly and displays the results |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
427 in a new split. If the current file has unsaved changes, it |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
428 will be saved first using |:update|. If the current file is an |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
429 unnamed buffer, it will be written to a temporary file first. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
430 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
431 The arguments given to |:RustEmitAsm| will be passed to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
432 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
433 If |g:rustc_path| is defined, it is used as the path to rustc. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
434 Otherwise it is assumed rustc can be found in $PATH. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
435 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
436 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
437 Running test(s) |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
438 --------------- |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
439 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
440 :[N]RustTest[!] [options] *:RustTest* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
441 Runs a test under the cursor when the current buffer is in a |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
442 cargo project with "cargo test" command. If the command did |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
443 not find any test function under the cursor, it stops with an |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
444 error message. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
445 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
446 When N is given, adjust the size of the new window to N lines |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
447 or columns. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
448 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
449 When ! is given, runs all tests regardless of current cursor |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
450 position. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
451 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
452 When [options] is given, it is passed to "cargo" command |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
453 arguments. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
454 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
455 When the current buffer is outside cargo project, the command |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
456 runs "rustc --test" command instead of "cargo test" as |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
457 fallback. All tests are run regardless of adding ! since there |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
458 is no way to run specific test function with rustc. [options] |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
459 is passed to "rustc" command arguments in the case. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
460 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
461 Takes optional modifiers (see |<mods>|): > |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
462 :tab RustTest |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
463 :belowright 16RustTest |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
464 :leftabove vert 80RustTest |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
465 < |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
466 rust.vim Debugging |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
467 ------------------ |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
468 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
469 :RustInfo *:RustInfo* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
470 Emits debugging info of the Vim Rust plugin. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
471 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
472 :RustInfoToClipboard *:RustInfoClipboard* |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
473 Saves debugging info of the Vim Rust plugin to the default |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
474 register. |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
475 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
476 :RustInfoToFile [filename] *:RustInfoToFile* |
33336
4541997c3638
runtime(doc): grammar fixes in doc (#13164)
Christian Brabandt <cb@256bit.org>
parents:
33255
diff
changeset
|
477 Saves debugging info of the Vim Rust plugin to the given file, |
4541997c3638
runtime(doc): grammar fixes in doc (#13164)
Christian Brabandt <cb@256bit.org>
parents:
33255
diff
changeset
|
478 overwriting it. |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
479 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
480 ============================================================================== |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
481 MAPPINGS *rust-mappings* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
482 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
483 This plugin defines mappings for |[[| and |]]| to support hanging indents. |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
484 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
485 ============================================================================== |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
30967
diff
changeset
|
486 vim:tw=78:sw=4:noet:ts=8:ft=help:norl: |