Skip to content

Commit

Permalink
Add NecoGhcDiagnostics command
Browse files Browse the repository at this point in the history
  • Loading branch information
eagletmt committed Feb 21, 2014
1 parent d6b2fe9 commit 333d0de
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ISSUES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# neco-ghc issues

When submitting an issue, please include the output by `:NecoGhcDiagnosis`.

```vim
NecoGhcDiagnosis
```

It shows your environment information possibly related to neco-ghc.

- Current filetype
- neco-ghc only works in the buffer with filetype haskell.
- ghc-mod executable (required)
- neco-ghc requires [ghc-mod](https://github.com/kazu-yamamoto/ghc-mod) and it must be placed in your `$PATH`.
- 'omnifunc'
- To use Vim builtin completion, `'omnifunc'` must be set to `necoghc#omnifunc` by `setlocal omnifunc=necoghc#omnifunc`.
- Completion plugin installation (optional)
- [neocomplete.vim](https://github.com/Shougo/neocomplete.vim)
- [neocomplcache.vim](https://github.com/Shougo/neocomplcache.vim)
- [YouCompleteMe](https://github.com/Valloric/YouCompleteMe)
- Other plugin installation (optional)
- [vimproc.vim](https://github.com/Shougo/vimproc.vim)
20 changes: 20 additions & 0 deletions autoload/necoghc/diagnostics.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function! necoghc#diagnostics#report()
echomsg 'Current filetype:' &l:filetype

let l:executable = executable('ghc-mod')
echomsg 'ghc-mod is executable:' l:executable
if !l:executable
echomsg ' Your $PATH:' $PATH
endif

echomsg 'omnifunc:' &l:omnifunc
echomsg 'neocomplete.vim:' exists(':NeoCompleteEnable')
echomsg 'neocomplcache.vim:' exists(':NeoComplCacheEnable')
echomsg 'YouCompleteMe:' exists(':YcmDebugInfo')

try
echomsg 'vimproc.vim:' vimproc#version()
catch /^Vim\%((\a\+)\)\=:E117/
echomsg 'vimproc.vim: not installed'
endtry
endfunction
1 change: 1 addition & 0 deletions plugin/necoghc.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
command! -nargs=0 NecoGhcDiagnostics call necoghc#diagnostics#report()

0 comments on commit 333d0de

Please sign in to comment.