haskell / haskell/haskell-mode
Hook turn-on-haskell-unicode-input-method breaks intero-mode completion support
- Dominant language
- Emacs Lisp
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
If I add to my Emacs' `init` file `(add-hook 'haskell-mode-hook 'turn-on-haskell-unicode-input-method)`, it breaks `intero-mode` completion support (and `company` completion support as well). When I comment that expression and restart Emacs, completion support comes back.
**Here is my configuration:**
macOS Sierra 10.12.5
Emacs Version 25.2 (9.0)
`stack resolver` lts-8.13
```
(use-package haskell-mode
:ensure t
:mode (("\\.hs\\'" . haskell-mode)
("\\.lhs\\'" . haskell-mode))
:diminish mmm-mode
:commands haskell-mode
:config
(use-package intero
:ensure t
:config
(flycheck-add-next-checker 'intero
'(warning . haskell-hlint))
(intero-global-mode)
(add-hook 'haskell-mode-hook 'intero-mode))
(use-package hindent
:load-path "packages/hindent/elisp"
:ensure t
:diminish hindent-mode
:config
(add-hook 'haskell-mode-hook 'hindent-mode)
:bind
("C-c i" . hindent-reformat-decl))
(use-package hayoo
:ensure t)
(use-package hamlet-mode
:ensure t
:after mmm-mode
:init
(setq mmm-global-mode 'maybe)
:config
(mmm-add-classes
'((hamlet-quasiquote
:submode hamlet-mode
:delimiter-mode nil
:front "\\[x?hamlet|"
:back "|\\]")))
(mmm-add-mode-ext-class 'haskell-mode nil 'hamlet-quasiquote))
(add-hook 'haskell-mode-hook 'eldoc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(add-hook 'haskell-mode-hook 'haskell-decl-scan-mode)
(add-hook 'haskell-mode-hook 'haskell-auto-insert-module-template)
(add-hook 'haskell-mode-hook
(lambda () (add-hook 'before-save-hook
'haskell-mode-format-imports t 'local)))
(add-hook 'haskell-mode-hook
(lambda () (set (make-local-variable 'company-backends)
(append
'((company-capf company-dabbrev-code))
company-backends))))
;; ;; add unicode support for special symbols
;; ;; see http://bit.ly/haskell-mode-unicode
;; ;; IT BREAKS INTERO-MODE COMPLETION & COMPANY SUPPORT
;; (add-hook 'haskell-mode-hook 'turn-on-haskell-unicode-input-method)
(if (fboundp 'electric-indent-local-mode)
(electric-indent-local-mode -1))
(setq-default haskell-stylish-on-save t)
(setq haskell-tags-on-save t
haskell-process-generate-tags nil
haskell-language-extensions '()
haskell-indent-spaces 4
haskell-compile-cabal-build-command "stack build"
flycheck-check-syntax-automatically
'(save idle-change new-line mode-enabled)
haskell-complete-module-preferred
'("Data.ByteString"
"Data.ByteString.Lazy"
"Data.Conduit"
"Data.Function"
"Data.List"
"Data.Map"
"Data.Maybe"
"Data.Monoid"
"Data.Text"
"Data.Ord")
haskell-session-default-modules
'("Control.Monad.Reader"
"Data.Text"
"Control.Monad.Logger")
haskell-interactive-mode-eval-mode 'haskell-mode
haskell-process-type 'ghci
haskell-process-path-ghci "stack"
haskell-process-use-ghci t
haskell-process-args-ghci
'("ghci" "--with-ghc" "intero" "--no-load" "--no-build")
haskell-process-generate-tags nil)
:bind
;; jump to imports
([f8] . haskell-navigate-imports)
;; generally format (sort, align) your imports
("C-c C-," . haskell-mode-format-imports)
;; insert 'undefined'
("C-c C-u" . haskell-insert-undefined)
;; insert doc comment: --|
("C-c C-a" . haskell-insert-doc)
;; indent nested by 1 space
("M-+" . haskell-move-right)
;; reindent nested by 1 space
("M-_" . haskell-move-left)
;; add cost centre for profiling
;; see http://bit.ly/haskell-cost-centres
("C-c C-s" . haskell-mode-toggle-scc-at-point)
;; compile with defined build command
("C-c C-c" . haskell-compile)
;; search definition in Hoogle
("C-c h" . hoogle)
;; show type of variable or expression at point
("C-c C-t" . haskell-mode-show-type-at)
;; clear repl history
("C-c C-k" . haskell-interactive-mode-clear))
```
Contributor guide
Assessment
This issue has not been assessed yet.