Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Haskell completion? #99

Open
cideM opened this issue Jul 1, 2017 · 3 comments
Open

Haskell completion? #99

cideM opened this issue Jul 1, 2017 · 3 comments
Labels

Comments

@cideM
Copy link

cideM commented Jul 1, 2017

I have absolutely no idea how to write a source myself and because deoplete fails on my system, using the code snippet that kinda adds deoplete as a possible source to nvim-completion-manager is also out of the question. Are there any plans to support Haskell?

@roxma
Copy link
Owner

roxma commented Jul 4, 2017

As a sub-optimal solution:

Install https://github.com/eagletmt/neco-ghc, and use :set omnifunc=necoghc#omnifunc, for testing it with <c-x><c-o>

Then add something like this into your vimrc:

au User CmSetup call cm#register_source({'name' : 'neco-ghc',
        \ 'priority': 9,  
        \ 'scopes': ['haskell'],
        \ 'abbreviation': 'hs',
        \ 'cm_refresh_patterns':['import\s+'],
        \ 'cm_refresh': {'omnifunc': 'necoghc#omnifunc'},
        \ })

I'm not familiar with haskell, you need to change the cm_refresh_patterns for special cases where you need to use neco-ghc.

@roxma roxma added the no-plan label Jul 4, 2017
@wbthomason
Copy link

@cideM In theory, you should also be able to get asynchronous Haskell completion in NCM through https://github.com/haskell/haskell-ide-engine, which has LSP support.

I haven't yet tested this out myself, however.

@tssm
Copy link

tssm commented Nov 9, 2017

@cideM I'm using the Haskell IDE engine suggested by @wbthomason and it is amazing. There's no need fora NCM source and currently it also provides hints, refactoring and others ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants