Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A completion plugin for Haskell, using ghc-mod
VimL Python
Latest commit 53a3d63 @Shougo Shougo Don't use expand()

neco-ghc: ghc-mod completion for neocomplcache/neocomplete/deoplete

A completion plugin for Haskell, using ghc-mod

What is neco-ghc

This plugin supports the following completion.

  • pragma
  • language
  • importing a module
  • importing a function of a module
  • function based on importing modules

neco-ghc was originally implemented by @eagletmt on July 25, 2010, and then ujihisa added some new features.


  • Install ghc-mod package by stack install ghc-mod or cabal install ghc-mod
  • Unarchive neco-ghc and put it into a dir of your &rtp.


neco-ghc provides necoghc#omnifunc for omni-completion. I recommend adding the following in your ~/.vim/ftplugin/haskell.vim.

" Disable haskell-vim omnifunc
let g:haskellmode_completion_ghc = 0
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc

See :help compl-omni for details on omni-completion.

Completion engines

This plugin can be used as a source of neocomplete.vim or neocomplcache.vim or deoplete.nvim. You can enjoy auto-completions without any specific configuration.

This plugin also should work with YouCompleteMe. To enable auto-completions, you have to add the following setting.

let g:ycm_semantic_triggers = {'haskell' : ['.']}



Default: 0

Show detailed information (type) of symbols. You can enable it by adding let g:necoghc_enable_detailed_browse = 1 in your vimrc. While it is quite useful, it would take longer boot time.

This feature was introduced in ghc-mod 1.11.5.


Default: 0

Show error message if ghc-mod command fails. Usually it would be noisy because ghc-mod browse Your.Project.Module always fails. Use this flag only if you have some trouble.


Q: neco-ghc does not work

Check the $PATH variable in vim contains the path to your ghc-mod command. Or you can execute :NecoGhcDiagnostics command for debug.

Q: Completion isn't working for local functions or modules

It's the limitation of ghc-mod. ghc-mod can show symbols of installed modules only. ghc-mod cannot show symbols of developping modules or current source file.


BSD3 License, the same license as ghc-mod.

Something went wrong with that request. Please try again.