summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-04-07 15:32:29 -0700
committerFranck Cuny <franck@fcuny.net>2024-04-07 15:32:29 -0700
commit3ecf17b3c07741d06b640435deb36fb03b26654b (patch)
treea87444f74b7845ba19eb7a5bc4891490bd51fd49
parentdon't use tramp (diff)
downloademacs.d-3ecf17b3c07741d06b640435deb36fb03b26654b.tar.gz
extra configuration for flyspell
-rw-r--r--config/init-writing.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/config/init-writing.el b/config/init-writing.el
index e60f030..c60a18a 100644
--- a/config/init-writing.el
+++ b/config/init-writing.el
@@ -9,10 +9,21 @@
 
 (require 'init-markdown)
 
-(require 'ispell)
-(setq ispell-program-name (executable-find "aspell"))
-(setq ispell-dictionary "en_US")
-(setq ispell-extra-args '("--camel-case"))
+(use-package flyspell
+  :commands (flyspell-mode flyspell-prog-mode)
+  :hook ((text-mode . flyspell-mode)
+	 (org-mode . flyspell-mode)
+	 (git-commit-mode . flyspell-mode)
+	 (prog-mode . flyspell-prog-mode))
+  :if (setq ispell-program-name (executable-find "aspell"))
+  :diminish flyspell-mode
+  :bind (:map flyspell-mode-map
+              ("C-." . nil)
+              ("C-;" . nil))
+  :custom
+  (ispell-silently-savep t)
+  (ispell-local-dictionary "en_US")
+  (ispell-extra-args '("--camel-case")))
 
 (provide 'init-writing)