1
0
Fork 0

[oni-core] Add settings for spell checking

- Inhibit the use of the ’ character in case a ' should be used so that spell
  checking programs don't get confused.

- Explicitly use the ‘hunspell’ program to perform spell checking.
This commit is contained in:
Tom Willemse 2021-11-10 21:32:14 -08:00
parent a0bd2014f3
commit b3965ea473

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2021.0921.232841 ;; Version: 2021.1110.213201
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview dashboard mixed-pitch) ;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview dashboard mixed-pitch)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -293,6 +293,20 @@ _s_: String list"
;; Im used to working with Monday as the starting day. ;; Im used to working with Monday as the starting day.
(setq calendar-week-start-day 1)) (setq calendar-week-start-day 1))
(defun oni-core-in-word-p ()
"Check whether the character just typed was part of a word."
(save-excursion
(backward-char)
(looking-back (rx word) (1- (point)))))
(with-eval-after-load 'electric
(add-hook 'electric-quote-inhibit-functions #'oni-core-in-word-p))
(eval-when-compile (require 'ispell))
(with-eval-after-load 'ispell
(setq ispell-program-name "hunspell"
ispell-really-hunspell t))
;; Enable any modes that I want to have turned on right away. ;; Enable any modes that I want to have turned on right away.
(electric-indent-mode -1) (electric-indent-mode -1)