File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
- function ! cargo#Load ()
1
+ function ! cargo#Load ()
2
2
" Utility call to get this script loaded, for debugging
3
3
endfunction
4
4
5
- function ! cargo#cmd (args )
5
+ function ! cargo#cmd (args ) abort
6
6
" Trim trailing spaces. This is necessary since :terminal command parses
7
7
" trailing spaces as an empty argument.
8
8
let args = substitute (a: args , ' \s\+$' , ' ' , ' ' )
9
- if has (' terminal' )
9
+ if exists (' g:cargo_shell_command_runner' )
10
+ let cmd = g: cargo_shell_command_runner
11
+ elseif has (' terminal' )
10
12
let cmd = ' terminal'
11
13
elseif has (' nvim' )
12
14
let cmd = ' noautocmd new | terminal'
Original file line number Diff line number Diff line change @@ -187,6 +187,16 @@ g:cargo_makeprg_params~
187
187
let g:cargo_makeprg_params = 'build'
188
188
<
189
189
190
+ *g:cargo_shell_command_runner*
191
+ g:cargo_shell_command_runner~
192
+ Set this option to change how to run shell commands for cargo commands
193
+ | :Cargo | , | :Cbuild | , | :Crun | , ...
194
+ By default, | :terminal | is used to run shell command in terminal window
195
+ asynchronously. But if you prefer | :! | for running the commands, it can
196
+ be specified: >
197
+ let g:cargo_shell_command_runner = '!'
198
+ <
199
+
190
200
191
201
Integration with Syntastic *rust-syntastic*
192
202
--------------------------
You can’t perform that action at this time.
0 commit comments