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 ()
22 " Utility call to get this script loaded, for debugging
33endfunction
44
5- function ! cargo#cmd (args )
5+ function ! cargo#cmd (args ) abort
66 " Trim trailing spaces. This is necessary since :terminal command parses
77 " trailing spaces as an empty argument.
88 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' )
1012 let cmd = ' terminal'
1113 elseif has (' nvim' )
1214 let cmd = ' noautocmd new | terminal'
Original file line number Diff line number Diff line change @@ -187,6 +187,16 @@ g:cargo_makeprg_params~
187187 let g:cargo_makeprg_params = 'build'
188188<
189189
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+
190200
191201Integration with Syntastic *rust-syntastic*
192202--------------------------
You can’t perform that action at this time.
0 commit comments