• Stars
    star
    363
  • Rank 117,374 (Top 3 %)
  • Language
    Vim Script
  • Created about 14 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A completion plugin for Haskell, using ghc-mod

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

A completion plugin for Haskell, using ghc-mod or hhpc

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 the ghc-mod package by stack install ghc-mod or cabal install ghc-mod OR install the hhp package by stack install hhp or cabal install hhp
  • Unarchive neco-ghc and put it into a dir of your &rtp.

Note: If you use ghc-mod 5.4, you should use ghc-mod 5.5+. Because, ghc-mod 5.5 fixes the rootdir problem.

DanielG/ghc-mod#665

Usage

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' : ['.']}

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 will take longer boot time.

This feature was introduced in ghc-mod 1.11.5.

g:necoghc_debug

Default: 0

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

g:necoghc_use_stack

Default: 0

Allow using stack's own ghc-mod/hhpc. If you are using ghc-mod, it will change direct ghc-mod mod calls to stack exec --no-stack-exe ghc-mod -- instead. The same goes for hhpc. Use this flag if your globally installed ghc-mod/hhpc doesn't work properly with your stack projects.

Troubleshoot

Q: neco-ghc does not work

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

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

#44

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

License

BSD3 License, the same license as ghc-mod.

More Repositories

1

switch_point

Switching database connection between readonly one and writable one
Ruby
593
star
2

ghcmod-vim

Happy Haskell programming on Vim, powered by ghc-mod
Vim Script
434
star
3

hako

Deploy Docker container
Ruby
276
star
4

faml

Faster implementation of Haml template language
Ruby
187
star
5

project-euler-c

solutions for Project Euler in C
C
60
star
6

android-repository-history

History of Android repository XML
Rust
29
star
7

guzuta

Custom repository manager for ArchLinux pacman
Rust
27
star
8

eagletmt-recutils

My recutils
Rust
27
star
9

misc

いろいろ
Rust
24
star
10

comic_walker

Client library for ComicWalker
Ruby
23
star
11

aws-lambda-rie-gateway

Convert HTTP request to API Gateway payload for aws-lambda-rie
Rust
15
star
12

libssh-ruby

Ruby binding for libssh
C
14
star
13

envop

Set environment variables from 1Password Secure Notes
Rust
13
star
14

haml_parser

Parser of Haml template language
Ruby
12
star
15

unite-haddock

unite.vim source for haddock
Vim Script
12
star
16

coqtop-vim

Interact with coqtop within Vim
Vim Script
11
star
17

slack-gtk

Native desktop client for slack.com
C++
10
star
18

mitamae-secrets

itamae-secrets for mitamae
Ruby
9
star
19

PKGBUILDs

my PKGBUILDs for Arch Linux
Shell
8
star
20

slack-thread-expander

Expand threaded messages without "Also sent to the channel"
Rust
7
star
21

onlinejudge-vim

enjoy online judges with Vim
Vim Script
6
star
22

kaede

Scheduler for recpt1 recorder using Syoboi Calendar
Ruby
5
star
23

ghci-vim

interact with GHCi
Vim Script
5
star
24

dotfiles

my dotfiles
Vim Script
5
star
25

assert_trait

Macro for static assert that values implements traits.
Rust
5
star
26

barbeque_client-rs

Barbeque client for Rust
Rust
4
star
27

contests

Programming contest is fun
C++
3
star
28

idolmap

Rust
3
star
29

akabei

Custom repository manager for ArchLinux pacman
Ruby
3
star
30

mruby-etc

etc module for mruby
C
3
star
31

django-runner

Run arbitrary Python script within Django environment
Python
3
star
32

dump-tf-schema

Dump schema of Terraform providers
Rust
3
star
33

activerecord-attribute_converter

Transparent conversion for ActiveRecord
Ruby
3
star
34

s3_assets_uploader

Upload Rails assets to S3
Ruby
3
star
35

faraday_middleware-cookiejar

Faraday middleware for managing cookies
Ruby
2
star
36

arch.wanko.cc

http://arch.wanko.cc
Rust
2
star
37

ttcoder

TokyoTechCoder
Ruby
2
star
38

revision_plate-golang

Serve application's REVISION
Go
2
star
39

setup

Ruby
2
star
40

btrfs-usage

Show detailed btrfs usage in machine-readable format
C
1
star
41

poj-vim

Vim script for POJ
Vim Script
1
star
42

denv-rust

Rust
1
star
43

mitamae-pacman

Provide MItamae::InlineBackends::PacmanBackend for faster package management
C
1
star
44

dvb-recpt1

recpt1 for earth-pt1 driver
C++
1
star
45

procon

My submissions
C++
1
star
46

eagletmt.github.com

1
star
47

uim-skk-server-completion

uim-skk で server completion γ§γγ‚‹γ‚ˆγ†γ«γ™γ‚‹
1
star
48

skkserv-rust

Rust
1
star
49

xz-rust

Pure Rust implementation of reading/writing xz files (WIP)
Rust
1
star
50

fastladder-bookwalker

Rust
1
star
51

hako-etcenv

Provide variables from etcenv to hako
Ruby
1
star
52

sentry-notify-hipchat

A Sentry notification plugin for HipChat
Python
1
star
53

sentry-breakdown

Render Sentry project breakdown of usage report (WIP)
Rust
1
star
54

rundeck-simple-slack-notification

Groovy
1
star
55

ruby-minisat

Ruby binding for MiniSat
Ruby
1
star
56

fastladder-pixiv

Rust
1
star
57

tower-cookie-store

Cookie session store for Tower and Axum
Rust
1
star
58

bf-interp

brainf*ck interpreter written in Haskell
Haskell
1
star
59

hako-vault

Provide variables from Vault to hako
Ruby
1
star
60

project-euler-haskell

solutions for Project Euler in Haskell
Haskell
1
star