I installed haskell-mode
, and I follow this tutorial to install company here.
But it only ran once; now when I launch Emacs I get this error:
Warning (initialization): An error occurred while loading /home/lowley/.emacs':
File error: Cannot open load file, company
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the --debug-init' option to view a complete error backtrace.
on M-x company-mode
, the company mode is activated but if I enter putS
it proposes putStrLn only (no putStr) and the mode turns to company-<dabbrev-code
.
Here is my emacs config file :
(require 'package)
(custom-set-variables
'(package-archives
(quote
(("gnu" . "http://elpa.gnu.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/")))))
(custom-set-variables
'(custom-enabled-themes (quote (misterioso))))
(custom-set-faces
)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(let ((my-cabal-path (expand-file-name "~/.cabal/bin")))
(setenv "PATH" (concat my-cabal-path ":" (getenv "PATH")))
(add-to-list 'exec-path my-cabal-path))
(add-to-list 'load-path "~/.cabal/share/ghc-mod-5.4.0.0")
(autoload 'ghc-init "ghc" nil t)
(autoload 'ghc-debug "ghc" nil t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(add-to-list 'company-backends 'company-ghc)
(custom-set-variables '(company-ghc-show-info t))