Ⅰ. 插件描述
vim plugin for rust-clippy linterⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'd3m3vilurr/clippy-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'd3m3vilurr/clippy-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'd3m3vilurr/clippy-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/d3m3vilurr/clippy.vim
Ⅳ. 文档说明
# clippy.vim
This is a vim plugin for rust-clippy.
This project based cargo.vim,
jFransham's work and cargo-clippy.
Prerequired
- rust nightly version
- syntastic,
Install
This plugin require builed rust-clippy library.
cd ~/.vim/bundle/clippy.vim
./install.shIf you use NeoBundle, just add the following to vimrc:
NeoBundle 'd3m3vilurr/clippy.vim', {
\ 'build': {
\ 'linux': './install.sh'
\ }
\ }And syntastic configure add to vimrc:
let g:syntastic_rust_checkers = ['rustc', 'clippy']Config variables
- let g:syntastic_rust_clippy_lib - Path of libclippy.so
- let g:syntastic_rust_clippy_pedantic - Pedantic mode flag; default 0
let g:syntastic_rust_clippy_cargo - rust-clippy build mode; default 1
- 0: Single file mode, direct use
rustccommand - 1: Simple cargo mode, use
cargo rustccommand other: Complex mode, use
cargo rustc <user_set_string>- If you set
--bin=abcd, it will runcargo rustc --bin=abcd
- If you set
- 0: Single file mode, direct use
License
clippy.vim is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.