vim-phpstan


Ⅰ. 插件描述

A Vim plugin for PHPStan - https://github.com/phpstan/phpstan. It calls `phpstan` to do static analysis of your PHP code and displays the errors in Vim's quickfix list.

Ⅱ. 基本信息

创建日期:  2017-02-04
使用用户:  6
Github星:  17
插件作者:  PHPStan

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'phpstan/vim-phpstan'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'phpstan/vim-phpstan'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'phpstan/vim-phpstan'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/phpstan/vim-phpstan

Ⅳ. 文档说明

# vim-phpstan

A Vim plugin for PHPStan. It calls phpstan to do static analysis of your PHP code and displays the errors in Vim's quickfix list.

See :help quickfix for more on how to use the quickfix.

Usage

Call the PHPStanAnalyse command and pass the directories you want analysed as arguments:

:PHPStanAnalyse src test

And the quickfix list will be populated with something like this:

vim phpstan quickfix screenshot

Installation

Using vim-plug:

Plug 'phpstan/vim-phpstan'

Configuration

You can configure the level PHPStan uses. By default the level is 2.

let g:phpstan_analyse_level = 4 in your .vimrc file to change the level to fit your needs.

Assumptions

This plugin assumes that the phpstan executable is available in the $PATH.

Authors

Authors
Robert Basichttps://github.com/robertbasic

添加新评论