iquiw / company-ghc

Company-mode completion back-end for haskell-mode via ghc-mod
125 stars 6 forks source link

company-ghc backend not found #14

Open gregwebs opened 9 years ago

gregwebs commented 9 years ago

I am a new emacs user trying to get along with spacemacs. I have ghc-mod installed. When I run company-ghc-diagnose, I see this output:

* company-ghc backend not found
* automatic scan module is disabled.
  You need to run either 'M-x company-ghc-turn-on-autoscan' once
  or 'M-x company-ghc-scan-modules' when it is necessary.
* ghc-boot process has not been done

I am hoping some documentation can be added to the Diagnostic section of the README for a next step to resolve this issue.

iquiw commented 9 years ago

company-backends needs to be configured to add company-ghc to the backend list. In standard Emacs way, M-x customize-variable RET company-backends and "INS"ert company-ghc as "User defined" backend. Or something like the following needs to be written in ~/.emacs.d/init.el.

(with-eval-after-load 'company
  (add-to-list 'company-backends 'company-ghc))

I am not sure what is standard way of spacemacs though. The following document might help. https://github.com/syl20bnr/spacemacs/tree/master/contrib/lang/haskell#install Writing (setq-default dotspacemacs-configuration-layers '(haskell)) to ~/.spacemacs seems to do necessary configurations.

I am hoping some documentation can be added to the Diagnostic section of the README for a next step to resolve this issue.

I will update the doc.

gregwebs commented 9 years ago

Thanks for looking into it. None of that seems to fix the issue for me. I will ask for help on the spacemacs gitter chat.