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,
:complete
command.:uses
, :loc-at
, :type-at
.As a result, you get very robust and lightning fast omni-completion, go-to-definition, go-to-uses, type-of-expression.
https://github.com/myfreeweb/intero.git
with git
and install with stack install
https://github.com/myfreeweb/intero.nvim.git
) with your favorite Vim package managerstack ghci --with-ghc intero
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.)
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.
This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE
file or unlicense.org.