Skip to content

hanst99/neco-ghc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 

Repository files navigation

neocomplcache-ghc (neco-ghc)

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

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

Usage

For neocomplcache users

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

For non-neocomplcache users

neco-ghc provides necoghc#omnifunc for omni-completion.

I suggest adding in your ~/.vim/ftplugin/haskell.vim: setlocal omnifunc=necoghc#omnifunc.

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

Options

g:necoghc_enable_detailed_browse

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.

Troubleshoot

If for some reason the neco-ghc plugin is not being added to neocomplcache, check that the $PATH variable in vim contains the path to your .cabal/bin directory.

if not, add in your .vimrc:

let $PATH = $PATH . ':' . expand("~/.cabal/bin")

License

BSD3 License, the same license as ghc-mod.

About

A neocomplcache plugin for Haskell, using ghc extensions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published