Replace Flyspell with Jinx

This commit is contained in:
Dimitri Lozeve 2023-05-24 17:27:36 +02:00
parent f187dfe715
commit 15df2edc2e

19
init.el
View file

@ -800,20 +800,13 @@
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer))
(use-package flyspell
(use-package jinx
:straight t
:hook (emacs-startup . global-jinx-mode)
:config
(setq ispell-program-name "hunspell")
(setq ispell-local-dictionary "en_GB")
(setq ispell-local-dictionary-alist
;; Please note the list `("-d" "en_US")` contains ACTUAL parameters passed to hunspell
;; You could use `("-d" "en_US,en_US-med")` to check with multiple dictionaries
'(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_GB") nil utf-8)))
(add-hook 'text-mode-hook #'flyspell-mode)
;; (add-hook 'prog-mode-hook #'flyspell-prog-mode)
(global-set-key (kbd "<f8>") 'ispell-word)
(global-set-key (kbd "C-S-<f8>") 'flyspell-mode)
(global-set-key (kbd "M-<f8>") 'flyspell-buffer)
(global-set-key (kbd "C-<f8>") 'flyspell-check-previous-highlighted-word))
(setq jinx-languages "en_US fr_FR")
:bind (("M-$" . jinx-correct)
("C-M-$" . jinx-languages)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; External media