Ⅰ. 插件描述
Vim plugin to quickly view info about the packages you useⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'meain/vim-package-info'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'meain/vim-package-info'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'meain/vim-package-info'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/meain/vim-package-info
Ⅳ. 文档说明
# vim-package-info
It lets you view the latest version of the packages you depend on and see if any of them are vulnerable.
Vulnerability detection is still a work in progress (disabled at the moment)

Currently supports:
javascript:
package.json
rust:
Cargo.toml
python:
requirements.txtPipfilepyproject.toml
Default colors:
green: patch updatecyan: minor updatered: major update
Installation
Make sure you have node support for neovim.
Run the commandnpm install -g neovimto add it. #20
Use your favorite plugin manager to install the plugin.
I use vim-plug.
Plug 'meain/vim-package-info', { 'do': 'npm install' }After installing the plugin, run :UpdateRemotePlugins to register it with Neovim.
Needs virtual text support. ( Neovim 0.3.2 )
Check if
echo has('nvim-0.3.2')returns 1
Configuration
Change prefix
let g:vim_package_info_virutaltext_prefix = ' ¤ 'Change highlight group
let g:vim_package_info_virutaltext_highlight = 'NonText'There are three other highlight groups that you can change.
You can change them like this
hi VimPackageInfoPatch guifg=#8BC34A
hi VimPackageInfoMinor guifg=#00BCD4
hi VimPackageInfoMajor guifg=#F44336Possible issues
The plugin might conflict with ALE or any other plugins that use virtualtext.
This is because virtualtext context is the same for all the plugins and if one clears the virtualtext
it will clear the virutaltext that was made by all plugins.
Not a lot can be done about this, but in the case of ALE you can checkout #14.