From bc50d7cab02114367505c82371a4f7f27c72ad53 Mon Sep 17 00:00:00 2001 From: xiaoniu Date: Wed, 11 Jul 2018 20:35:12 +0800 Subject: [PATCH 1/2] autoload/cargo.vim: Add cargo path specification --- autoload/cargo.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/cargo.vim b/autoload/cargo.vim index b9aca719..15fd1a8e 100644 --- a/autoload/cargo.vim +++ b/autoload/cargo.vim @@ -3,7 +3,8 @@ function! cargo#Load() endfunction function! cargo#cmd(args) - execute "! cargo" a:args + let cargo = exists("g:cargo_path") ? g:cargo_path : "cargo" + execute '!' . shellescape(cargo) . ' ' a:args endfunction function! s:nearest_cargo(...) abort From 21ec16298340cbea1ec3b6146a3b51d27ebecefc Mon Sep 17 00:00:00 2001 From: xiaoniu Date: Wed, 11 Jul 2018 21:40:02 +0800 Subject: [PATCH 2/2] add documents for cargo_path --- doc/rust.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/rust.txt b/doc/rust.txt index 70ce9625..3e06869a 100644 --- a/doc/rust.txt +++ b/doc/rust.txt @@ -174,6 +174,13 @@ g:rust_clip_command~ let g:rust_clip_command = 'xclip -selection clipboard' < + *g:cargo_path* +g:cargo_path~ + Set this option to the path to cargo for use in the |:Cargo| and + |:Cbuild| commands. If unset, "cargo" will be located in $PATH: > + let g:cargo_path = $HOME."/bin/cargo" +< + Integration with Syntastic *rust-syntastic* --------------------------