From 5eabc38e3ce02bf6e2553a15a85ff56a4ed5dd8b Mon Sep 17 00:00:00 2001 From: Emma Turner Date: Sat, 23 May 2026 21:16:11 -0600 Subject: [PATCH] Move spellcheck config into platform configs Linux requires less configuration and worked mostly out of the box --- config.el | 21 --------------------- lisp/gnu-linux.el | 6 ++++++ lisp/windows-nt.el | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/config.el b/config.el index 0ff9b1f..8aa6ca1 100644 --- a/config.el +++ b/config.el @@ -102,27 +102,6 @@ (setq org-refile-targets '((nil :maxlevel . 3) (org-agenda-files :maxlevel . 1)))) -;; TODO: Find out what _actually_ needs to be set here -;; i.e. shouldn't need to set both ispell-dictionary and ispell-local-dictionary -(after! - ispell - (setq ispell-dictionary "en_US") - (setq ispell-local-dictionary "en_US") - (setq ispell-extra-args '("-d" "en_US")) - (setq ispell-local-dictionary-alist - '(("en_US" "[A-Za-z]" "[^A-Za-z]" "[']" nil nil nil utf-8))) - (setq ispell-hunspell-dictionary-alist - '(("en_US" - "C:/hunspell/en_US.aff" - "C:/hunspell/en_US.dic" - nil - nil - nil - "utf-8"))) - ;; This is the default hunspell personal dictionary - ;; Hunspell won't create it, and ispell needs this file specified to work - (setq ispell-personal-dictionary "~/.hunspell_en_US")) - (use-package! elisp-autofmt :commands (elisp-autofmt-mode elisp-autofmt-buffer) diff --git a/lisp/gnu-linux.el b/lisp/gnu-linux.el index 7b77c7d..dbeb00f 100644 --- a/lisp/gnu-linux.el +++ b/lisp/gnu-linux.el @@ -1,6 +1,12 @@ ;;; $DOOMDIR/lisp/gnu-linux.el --- GNU/Linux specific configuration -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: +(require 'doom) + +(after! + ispell (setq ispell-dictionary "en_US") + ;; Hunspell won't create it, and ispell needs this file specified to work + (setq ispell-personal-dictionary "~/.hunspell_en_US")) ;; For elisp-autofmt ;; Local variables: diff --git a/lisp/windows-nt.el b/lisp/windows-nt.el index 6605e4f..1551ac8 100644 --- a/lisp/windows-nt.el +++ b/lisp/windows-nt.el @@ -1,6 +1,8 @@ ;;; $DOOMDIR/lisp/windows-nt.el --- Windows specific configuration -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: +(require 'doom) + ;; Windows path (when (eq system-type 'windows-nt) @@ -20,6 +22,28 @@ (append exec-path (split-string (getenv "PATH") path-separator t))))) (setenv "PATH" (mapconcat 'identity (delete-dups path) path-separator)))) + +;; TODO: Find out what _actually_ needs to be set here +;; i.e. shouldn't need to set both ispell-dictionary and ispell-local-dictionary +(after! + ispell + (setq ispell-dictionary "en_US") + (setq ispell-local-dictionary "en_US") + (setq ispell-extra-args '("-d" "en_US")) + (setq ispell-local-dictionary-alist + '(("en_US" "[A-Za-z]" "[^A-Za-z]" "[']" nil nil nil utf-8))) + (setq ispell-hunspell-dictionary-alist + '(("en_US" + "C:/hunspell/en_US.aff" + "C:/hunspell/en_US.dic" + nil + nil + nil + "utf-8"))) + ;; This is the default hunspell personal dictionary + ;; Hunspell won't create it, and ispell needs this file specified to work + (setq ispell-personal-dictionary "~/.hunspell_en_US")) + ;; For elisp-autofmt ;; Local variables: ;; elisp-autofmt-load-packages-local: ("use-package" "use-package-core")