Ⅰ. 插件描述
Vim support for Liquid TypesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ucsd-progsys/liquid-types-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ucsd-progsys/liquid-types-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ucsd-progsys/liquid-types-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ucsd-progsys/liquid-types.vim
Ⅳ. 文档说明
# liquid-types.vim
Vim support for Liquid Typing
Install
Step 1. Add the following to your .vimrc
Bundle 'scrooloose/syntastic'
Bundle 'panagosg7/vim-annotations'
let g:vim_annotations_offset = '/.liquid/'Step 2. Copy the following files
cp syntax/haskell.vim ~/.vimrc/syntax/haskell.vim
cp syntax/liquid.vim ~/.vimrc/bundle/syntastic/syntax_checkers/haskell/liquid.vimRun
:SyntasticCheck liquidruns liquidhaskell on the current buffer.
View
- Warnings will be displayed in the usual error buffer.
- Inferred Types will be displayed when
<F1>is pressed over an identifier.
Configure
You can configure the checker in various ways in your .vimrc.
- To run after each save, for all Haskell files, add:
let g:syntastic_mode_map = { 'mode': 'active' }
let g:syntastic_haskell_checkers = ['hdevtools', 'hlint', 'liquid']- To pass extra options to liquidhaskell add:
let g:syntastic_haskell_liquid_args = "--diff"