Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions autoload/cargo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ function! cargo#install(args)
call cargo#cmd("install " . a:args)
endfunction

function! cargo#clippy(args)
call cargo#cmd("clippy " . a:args)
endfunction

function! cargo#runtarget(args)
let l:filename = expand('%:p')
let l:read_manifest = system('cargo read-manifest')
Expand Down
3 changes: 3 additions & 0 deletions doc/rust.txt
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ This plug defines very simple shortcuts for invoking Cargo from with Vim.
:Cinstall <args> *:Cinstall*
Shortcut for 'cargo install`.

:Cclippy <args> *:Cclippy*
Shortcut for 'cargo clippy`.

:Cruntarget <args> *:Cruntarget*
Shortcut for 'cargo run --bin' or 'cargo run --example',
depending on the currently open buffer.
Expand Down
1 change: 1 addition & 0 deletions plugin/cargo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ command! -nargs=* Cupdate call cargo#update(<q-args>)
command! -nargs=* Csearch call cargo#search(<q-args>)
command! -nargs=* Cpublish call cargo#publish(<q-args>)
command! -nargs=* Cinstall call cargo#install(<q-args>)
command! -nargs=* Cclippy call cargo#clippy(<q-args>)
command! -nargs=* Cruntarget call cargo#runtarget(<q-args>)

let &cpoptions = s:save_cpo
Expand Down