How do I set intero-mode as default for my Haskell buffers instead of haskell-mode?

I looked it up and intero-mode is a minor mode, not a major mode. You probably want to be using that with haskell-mode, not instead of haskell-mode.

The library also contains a globalized minor mode which knows what to do, so you could just add the following to your init file:

(with-eval-after-load 'haskell-mode
  (require 'intero)
  (intero-global-mode 1))

See also C-hf intero-mode-maybe RET which is used by the globalized mode to decide whether or not to enable intero-mode in any given buffer.


FYI if intero-mode had been a major mode, then the answer to your stated question would have been:

(add-to-list 'auto-mode-alist '("\\.hs\\'" . intero-mode))

but in this case you don't actually want to do that.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.