annotate runtime/doc/ft_rust.txt @ 21691:f41c646cb8b9 v8.2.1395

patch 8.2.1395: Vim9: no error if declaring a funcref with lower case letter Commit: https://github.com/vim/vim/commit/98b4f145eb89405021e23a4a37db51d60a75a1d0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 8 15:46:01 2020 +0200 patch 8.2.1395: Vim9: no error if declaring a funcref with lower case letter Problem: Vim9: no error if declaring a funcref with a lower case letter. Solution: Check the name after the type is inferred. Fix confusing name.
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Aug 2020 16:00:04 +0200
parents af69c9335223
children d19b7aee1925
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18879
af69c9335223 Vim 8.2 release
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
1 *ft_rust.txt* For Vim version 8.2. Last change: 2017 Nov 02
14123
583bf95b6c84 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
2
583bf95b6c84 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
3 This is documentation for the Rust filetype plugin.
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 ==============================================================================
11262
214f228718cf Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
6 CONTENTS *rust*
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 1. Introduction |rust-intro|
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 2. Settings |rust-settings|
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 3. Commands |rust-commands|
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 4. Mappings |rust-mappings|
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
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 INTRODUCTION *rust-intro*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 This plugin provides syntax and supporting functionality for the Rust
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 filetype.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 ==============================================================================
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 SETTINGS *rust-settings*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 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
23 behavior of the plugin.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 *g:rustc_path*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 g:rustc_path~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 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
28 |:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 let g:rustc_path = $HOME."/bin/rustc"
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 *g:rustc_makeprg_no_percent*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 g:rustc_makeprg_no_percent~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 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
35 "rustc %": >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 let g:rustc_makeprg_no_percent = 1
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 *g:rust_conceal*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 g:rust_conceal~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 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
42 let g:rust_conceal = 1
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 *g:rust_conceal_mod_path*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 g:rust_conceal_mod_path~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 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
48 "::": >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 let g:rust_conceal_mod_path = 1
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
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 *g:rust_conceal_pub*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 g:rust_conceal_pub~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 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
55 let g:rust_conceal_pub = 1
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 *g:rust_recommended_style*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 g:rust_recommended_style~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 Set this option to enable vim indentation and textwidth settings to
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 conform to style conventions of the rust standard library (i.e. use 4
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 spaces for indents and sets 'textwidth' to 99). This option is enabled
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 by default. To disable it: >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 let g:rust_recommended_style = 0
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 *g:rust_fold*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 g:rust_fold~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 Set this option to turn on |folding|: >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 let g:rust_fold = 1
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 Value Effect ~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 0 No folding
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 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
75 default.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 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
77 global value (all folds are closed by default).
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 *g:rust_bang_comment_leader*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 g:rust_bang_comment_leader~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 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
82 using the /*! syntax: >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 let g:rust_bang_comment_leader = 1
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 *g:ftplugin_rust_source_path*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 g:ftplugin_rust_source_path~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 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
89 source files: >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 *g:rustfmt_command*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 g:rustfmt_command~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 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
96 not specified it defaults to 'rustfmt' : >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 let g:rustfmt_command = 'rustfmt'
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99 *g:rustfmt_autosave*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 g:rustfmt_autosave~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 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
102 buffer. If not specified it defaults to 0 : >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 let g:rustfmt_autosave = 0
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 *g:rustfmt_fail_silently*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 g:rustfmt_fail_silently~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 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
108 |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
109 let g:rustfmt_fail_silently = 0
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 *g:rustfmt_options*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 g:rustfmt_options~
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113 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
114 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
115 defaults to '' : >
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 let g:rustfmt_options = ''
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 *g:rust_playpen_url*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 g:rust_playpen_url~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 11262
diff changeset
121 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
122 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
123 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125 *g:rust_shortener_url*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
126 g:rust_shortener_url~
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 11262
diff changeset
127 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
128 let g:rust_shortener_url = 'https://is.gd/'
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 <
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
131
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 ==============================================================================
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 COMMANDS *rust-commands*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 :RustRun [args] *:RustRun*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 :RustRun! [rustc-args] [--] [args]
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137 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
138 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
139 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
140 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
141 directory, but is run from the current directory.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
142
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
143 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
144 compiled binary.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
145
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
146 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
147 A "--" argument will separate the rustc arguments from the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
148 arguments passed to the binary.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
149
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
150 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
151 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
152
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
153 :RustExpand [args] *:RustExpand*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
154 :RustExpand! [TYPE] [args]
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
155 Expands the current file using --pretty and displays the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
156 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
157 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
158 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
159 temporary file first.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
160
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
161 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
162 This is largely intended for specifying various --cfg
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
163 configurations.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
164
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
165 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
166 pass to rustc --pretty. Otherwise it will default to
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
167 "expanded".
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 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
170 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
171
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
172 :RustEmitIr [args] *:RustEmitIr*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
173 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
174 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
175 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
176 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
177
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
178 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
179
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
180 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
181 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
182
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
183 :RustEmitAsm [args] *:RustEmitAsm*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
184 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
185 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
186 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
187 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
188
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
189 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
190
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
191 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
192 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
193
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
194 :RustPlay *:RustPlay*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
195 This command will only work if you have web-api.vim installed
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
196 (available at https://github.com/mattn/webapi-vim). It sends the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
197 current selection, or if nothing is selected, the entirety of the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
198 current buffer to the Rust playpen, and emits a message with the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
199 shortened URL to the playpen.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
200
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
201 |g:rust_playpen_url| is the base URL to the playpen, by default
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
202 "https://play.rust-lang.org/".
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
203
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 11914
diff changeset
204 |g:rust_shortener_url| is the base URL for the shortener, by
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
205 default "https://is.gd/"
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
206
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
207 :RustFmt *:RustFmt*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
208 Runs |g:rustfmt_command| on the current buffer. If
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
209 |g:rustfmt_options| is set then those will be passed to the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
210 executable.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
211
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
212 If |g:rustfmt_fail_silently| is 0 (the default) then it
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
213 will populate the |location-list| with the errors from
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
214 |g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
215 then it will not populate the |location-list|.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
216
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
217 :RustFmtRange *:RustFmtRange*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
218 Runs |g:rustfmt_command| with selected range. See
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
219 |:RustFmt| for any other information.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
220
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
221 ==============================================================================
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
222 MAPPINGS *rust-mappings*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
223
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
224 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
225
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
226 It also has a few other mappings:
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
227
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
228 *rust_<D-r>*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
229 <D-r> Executes |:RustRun| with no arguments.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
230 Note: This binding is only available in MacVim.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
231
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
232 *rust_<D-R>*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
233 <D-R> Populates the command line with |:RustRun|! using the
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
234 arguments given to the last invocation, but does not
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
235 execute it.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
236 Note: This binding is only available in MacVim.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
237
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
238 ==============================================================================
14519
5c5908e81e93 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14123
diff changeset
239 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: