summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authornoa2024-09-18 09:40:21 +0800
committernoa2024-09-18 09:40:21 +0800
commit105203f8ba75ac4983d1f9c645d1e88af81bd14d (patch)
tree64273d9f0bf0299d54faf8d1247997aa5d91a416 /emacs
parent380e6153a9f995ae8b424ce29b058b5ac63aba2f (diff)
Convert jinx to use-package
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el13
1 files changed, 7 insertions, 6 deletions
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)