clippy.vim


Ⅰ. 插件描述

vim plugin for rust-clippy linter

Ⅱ. 基本信息

创建日期:  2016-02-14
使用用户:  1
Github星:  3
插件作者:  Sunguk Lee

Ⅲ. 安装方法

使用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

Install

This plugin require builed rust-clippy library.

cd ~/.vim/bundle/clippy.vim
./install.sh

If 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 rustc command
    • 1: Simple cargo mode, use cargo rustc command
    • other: Complex mode, use cargo rustc <user_set_string>

      1. If you set --bin=abcd, it will run cargo rustc --bin=abcd

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.

添加新评论