aboutsummaryrefslogtreecommitdiffstats

Integrate the french grammar and typography checker Grammalecte with flycheck to automatically look for mistakes in your writings. It also provides an easy way to find synonyms and antonyms for a given word (to avoid repetitions for exemple). This package is of very little interest for other languages.

Installation

This package has a strong dependency on python3. The installation of the right version of python is up to you.

Flycheck grammalecte is available on MELPA stable and unstable. Please read the Installing Package documentation from the EmacsWiki to know more how to install a package. A manual installation procedure exists too if you prefer.

If you install Flycheck grammalecte as a package, you need to add the following line somewhere in your GNU Emacs config file:

(require 'flycheck-grammalecte)

Then restart GNU Emacs.

Finally, the last expected step is to download the CLI & Server upstream package. Just enter the following command: M-x flycheck-grammalecte-download-grammalecte

Configuration

All options are accessibles with customize. In GNU Emacs, enter M-x customize, then click on Editing, then I18n, and finally on Flycheck Grammalecte.

You can also set this variables in your GNU Emacs config file. Here is a quick reference of the available variables:

flycheck-grammalecte-report-spellcheck
If this variable is set to nil, Flycheck will not report spellchecking error. Only grammar errors will be notified. nil is the default value as you should better use flyspell or ispell.
flycheck-grammalecte-report-grammar
If this variable is set to nil, Flycheck will not report grammar error. Only spellchecking errors will be notified. Default is t.
flycheck-grammalecte-report-apos
If this variable is set to nil, Flycheck will not report typographical apostrophes (’) error. This can be usefull when your main editor mode manage apostrophe by itself (like LaTeX, org-mode export…). Default is t.
flycheck-grammalecte-report-nbsp
If this variable is set to nil, Flycheck will not report non-breakable spaces error. This can be usefull when your main editor mode manage spaces by itself (like LaTeX, org-mode export…). Default is t.
flycheck-grammalecte-report-esp
If this variable is set to nil, Flycheck will not report useless spaces and tabs error. This can be usefull when your main editor mode manage spaces by itself (like LaTeX, org-mode export…). Default is t.
flycheck-grammalecte-enabled-modes
This variable stores the list of major modes for which flycheck-grammalecte must be used. Warning, this variable must be set before loading flycheck-grammalecte itself. Thus, do not try to set it with customize. Put it directly in your GNU Emacs config file. Default is ’(org-mode text-mode mail-mode latex-mode). To add markdown mode, for example, use the following line:
(setq flycheck-grammalecte-enabled-modes
      '(org-mode text-mode mail-mode latex-mode markdown-mode mu4e-compose-mode))
(require 'flycheck-grammalecte)

Breaking changes

Version 0.9

This version changes the default value of flycheck-grammalecte-report-spellcheck to nil, making now grammalecte to not report spellchecking errors. If you like the old behavior, you are now required to explicitely set this variable to t.

Usage

Enable flycheck in a buffer, which major mode is declared in flycheck-grammalecte-enabled-modes, and voilà!

If you are looking for a better word at some place, you can use the function flycheck-grammalecte-find-synomyms-at-point (which will take the word at point to find synonyms and antonyms) or the simpler flycheck-grammalecte-find-synomyms (which will ask you for a word before doing the search). Pro tip: these functions are available even in buffer, which major mode is not in the flycheck-grammalecte-enabled-modes list.

Credits

The original package has been written by Guilhem Doulcier.

This package would have not existed without the nice work of the people behinds the Grammalecte and the “Dictionnaire Électronique des Synonymes” projects.