intero-neovim : v1.0.0
Get the lightning fast type information and go-to-definition that Intero provides without going to the dark side of emacs!
This plugin is compatible with
After you've installed the plugin, it'll keep your
intero installs setup for
you. I recommend adding
intero-0.1.16 to your
stack.yaml build-depends to
ensure you get the newer version, as the
intero-0.1.15 version doesn't
automatically collect type information.
This plugin provides an integration with Intero via Neovim's terminal and asynchronous job control. You might like the following shortcuts:
" Process management: nnoremap <Leader>hio :InteroOpen<CR> nnoremap <Leader>hik :InteroKill<CR> nnoremap <Leader>hic :InteroHide<CR> nnoremap <Leader>hil :InteroLoadCurrentModule<CR> " REPL commands nnoremap <Leader>hie :InteroEval<CR> nnoremap <Leader>hit :InteroGenericType<CR> nnoremap <Leader>hiT :InteroType<CR> nnoremap <Leader>hii :InteroInfo<CR> nnoremap <Leader>hiI :InteroTypeInsert<CR> " Go to definition: nnoremap <Leader>hid :InteroGoToDef<CR> " Highlight uses of identifier: nnoremap <Leader>hiu :InteroUses<CR> " Reload the file in Intero after saving autocmd! BufWritePost *.hs InteroReload
The following commands are available:
This prompts the user to input a string, which gets sent to the REPL and evaluated by Intero.
This retrieves the last thing that was evaluated by
This gets the type at the current point.
Inserts the type of the current identifier in the above line at the top level.
This gets the type at the current point without generalizing the term.
Highlights all uses of the current identifier and sets it to be the search
term. Also runs the command
:uses in the Intero REPL.
Jumps to the definition of the current item if it is defined in the same package. Otherwise, echoes where it is defined.
:r to the REPL, causing it to reload the current module set.
This loads the current module.
Opens the Intero terminal buffer.
Hides the Intero buffer without killing the process.
This starts an Intero process connected to a
terminal buffer. It's hidden at
Kills the Intero process and buffer.
Completion is not handled by this plugin. Check out neco-ghc for fast
omnicomplete. If you have good reason for
wanting Intero-provided completion, please post in the related
BSD3 License, the same license as ghcmod-vim.