-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion isn't working for local functions or modules #44
Comments
I think it is same problem. |
In #35 completion works only for Prelude. In my case it also works in other imported modules (e.g. Xmonad) |
You should create minimal .vimrc and reproduce ways. |
vimrc: set nocompatible
filetype off
call plug#begin('~/.vim/plugged')
Plug 'Shougo/vimproc.vim'
Plug 'eagletmt/neco-ghc'
call plug#end()
filetype plugin indent on
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc some very simple source file:
result is |
It's the limitation of ghc-mod. As for completion for current source file, |
I think this should be in some "FAQ" or "Limitations" section of README. |
Added it. |
Unfortunately, this behavior causes auto complete to fail for definitions in the local module / buffer. eagletmt/neco-ghc#44 Use `<C-x><C-p>` or `<C-x><C-n>` to manually get that type of completion. Also `g:haskellmode_completion_ghc` has to be `0` for me even though the vim in 2016 article and associated repo show it equal to `1`. http://www.stephendiehl.com/posts/vim_2016.html
From my tests, it works fine if you are in a cabal sandbox and did Then you have all the symbols of your current project, but only from that installed state. |
Completion works only for system-wide and cabal libraries. If I create some very simple source file it will not complete functions from this file, or any other module created by me.
NecoGhcDiagnostics
output:The text was updated successfully, but these errors were encountered: