haskell / haskell-mode

Emacs mode for Haskell
http://haskell.github.io/haskell-mode/
GNU General Public License v3.0
1.33k stars 342 forks source link

How to disable doc-mode? #1617

Closed mgsloan closed 5 years ago

mgsloan commented 6 years ago

I recently switched off of using spacemacs and still building up my custom emacs config. So, I'm now starting from scratch with vanilla haskell-mode and customizing from there.

Anyway, I would really like to disable the messages that pop up with tips about haskell syntax and functions from the prelude. I've searched around quite a bit, tried a few things, but nothing seems to work. I'm somewhat familiar with copy modifying configurations, and have beginner level elisping, but don't yet have the emacs skills to figure out why this particular behavior is occurring.

I've tried the following, based on a suggestion from https://wiki.haskell.org/Emacs/Inferior_Haskell_processes

(use-package haskell-mode
  :config
  (remove-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode))

But it doesn't work! Moreover, if I do M-x + haskell-doc-mode, it says that doc mode is disabled, but I still get messages about haskell syntax and prelude functions. I don't want these messages, because I know haskell syntax pretty darn well, and the prelude / base types may be quite misleading if importing something that uses another library. Generally, I would prefer to get precise info from things like intero rather than something that's making approximate guesses.

mgsloan commented 5 years ago

Finally figured out a way to do this:

(use-package haskell-mode
  :init
  (add-hook 'haskell-mode-hook (lambda () (setq-local eldoc-documentation-function nil))))