Skip to content

Disable interactive operator completions #1247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion haskell-completions.el
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,16 @@ Returns nil if no completions available."
(let ((prefix-data (haskell-completions-grab-prefix)))
(when prefix-data
(cl-destructuring-bind (beg end pfx typ) prefix-data
(when (not (eql typ 'haskell-completions-general-prefix))
(when (and (not (eql typ 'haskell-completions-general-prefix))
;; GHCi prior to version 8.0.1 have bug in `:complete`
;; command: when completing operators it returns a list of
;; all imported identifiers (see Track ticket URL
;; `https://ghc.haskell.org/trac/ghc/ticket/10576'). This
;; leads to significant Emacs slowdown. To aviod slowdown
;; operator completions are disabled for now.
(not (save-excursion
(goto-char (1- end))
(haskell-mode--looking-at-varsym))))
;; do not complete things in comments
(if (cl-member
typ
Expand Down