intero.nvim


Ⅰ. 插件描述

Haskell+Neovim lightning fast autocompletion and other IDE functionality

Ⅱ. 基本信息

创建日期:  2016-05-20
使用用户:  2
Github星:  76
插件作者:  myfreeweb

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# intero.nvim unlicense

Do you use Neovim to work on Haskell code?
Do you want really, really fast autocompletion and stuff?
Do you already use GHCi a lot?

Well, this project is for you.

So,

  • GHCi is the Haskell REPL. It has a :complete command.
  • Intero is a fork of GHCi that adds :uses, :loc-at, :type-at.
  • My fork of intero adds a MessagePack RPC server that exposes those commands!
  • This plugin connects to that server using Neovim's built-in MessagePack RPC client.

As a result, you get very robust and lightning fast omni-completion, go-to-definition, go-to-uses, type-of-expression.

Installation

  1. Clone https://github.com/myfreeweb/intero.git with git and install with stack install
  2. Install this plugin (https://github.com/myfreeweb/intero.nvim.git) with your favorite Vim package manager
  3. Run the REPL at your project root with stack ghci --with-ghc intero
  4. Configure your Neovim!

Note for Linux users: make sure you are using the openbsd netcat variant, which supports connecting to UNIX sockets. For Arch Linux use the openbsd-netcat package.

Example ftplugin/haskell.vim:

setlocal omnifunc=intero#omnifunc

vnoremap <buffer> <Leader>G :InteroGoto<CR>
vnoremap <buffer> <Leader>T :InteroType<CR>
vnoremap <buffer> <Leader>U :InteroUses<CR>
nnoremap <buffer> <Leader>m :call intero#ensurebufmodule()<CR>:call VimuxSendText(":m + ".b:intero_module."\n:reload\n")<CR>

(The last line uses Vimux to tell Intero to load the current module.)

Contributing

Please feel free to submit pull requests!

By participating in this project you agree to follow the Contributor Code of Conduct.

The list of contributors is available on GitHub.

License

This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE file or unlicense.org.

添加新评论