From 105203f8ba75ac4983d1f9c645d1e88af81bd14d Mon Sep 17 00:00:00 2001 From: noa Date: Wed, 18 Sep 2024 09:40:21 +0800 Subject: Convert jinx to use-package --- emacs/init.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'emacs') diff --git a/emacs/init.el b/emacs/init.el index cf46f0c..e775da5 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -167,12 +167,13 @@ (add-hook 'text-mode-hook #'abbrev-mode) ;; Jinx is a package for spellchecking. Previously i used [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html][flyspell]], which is built in, and [[https://codeberg.org/ideasman42/emacs-spell-fu][spell-fu]]. Flyspell is not ideal because it only checks the word under the point. Furthermore, the correction interface is not pleasant to look at with a proportional font as it uses spaces to align the candidates. Spell-fu checks all the words that are visible, thereby behaving much more like a traditional spell checker. Jinx improves on spell-fu by interacting with the spellcheck process in a more efficient way, and has a nicer interface to corrections. -(package-ensure 'jinx) -(setopt global-jinx-mode t) - -;; Replace the default spellcheck binding with jinx -(keymap-global-set "M-$" #'jinx-correct) -(keymap-global-set "C-M-$" #'jinx-languages) +(use-package jinx + :ensure t + :custom + (global-jinx-mode t) + :bind + ("M-$" . jinx-correct) + ("C-M-$" . jinx-languages)) ;; This is a cool function i took from the jinx wiki. It automatically creates an abbrev for words i correct, so if i make the same error again, it gets fixed without me having to do anything! (defun jinx--add-to-abbrev (overlay word) -- cgit 1.4.1-2-gfad0