15

company-ispell can complete a word at point, but what if you want to use Company to list the possible corrections for spelling?

As an added bonus, is there any way to integrate this into Flyspell?

Sean Allred
  • 6,861
  • 16
  • 85
  • 1
    A related question: http://emacs.stackexchange.com/q/8129/2609. – Name Mar 06 '15 at 12:32
  • 1
    @Name Well, that's talking about a pure elisp spell-checking *engine*, not an interface to that engine. [This question](http://emacs.stackexchange.com/q/2167/2264) is more the spirit of what I'm asking, but the present question has a much narrower scope. – Sean Allred Mar 06 '15 at 12:45
  • 1
    I'm afraid someone would have to reimplement `ispell-command-loop` to use `company-mode`. There doesn't seem to be an easy way to replace its prompting logic. – Dmitry Mar 06 '15 at 14:15
  • 3
    I'm really interested in an answer to this question, and I'm going to try to solve it myself when I get the chance. In the mean time, there's some lisp on Emacs Wiki that uses `popup.el` to display corrections: http://www.emacswiki.org/emacs/FlySpell#toc11 Maybe someone familiar with company can hack it togther. – nanny Mar 06 '15 at 14:39
  • 3
    While working on a solution for this, I came across this package [helm-flyspell](https://github.com/pronobis/helm-flyspell) – nanny Mar 11 '15 at 16:38
  • 1
    [ac-ispell](https://github.com/syohex/emacs-ac-ispell): ispell/aspell completion source for auto-complete, though I didn't find a similar one for company-mode. – xuchunyang Jun 27 '15 at 16:44

1 Answers1

6

There are already some different ways to show ispell correction candidates, I guess you just meant correcting misspelled word in a popup menu, not company-mode itself.

To correct misspelled word at point, both built-in M-$ (ispell-word) and C-c $ (flyspell-correct-word-before-point) works great, the former uses a buffer to show correction choices, while the later uses a GUI popup menu:

Running flyspell-correct-word-before-point on "flyspell"


There are also some other interface like popup and helm:

flyspell-popup:

flyspell-popup demo

helm-flyspell:

enter image description here

xuchunyang
  • 14,302
  • 1
  • 18
  • 39