(add-hook 'text-mode-hook #'flyspell-mode)
(add-hook 'text-mode-hook #'completion-preview-mode)
-;; (add-hook 'text-mode-hook
-;; (lambda ()
-;; (add-hook 'completion-at-point-functions
-;; #'ispell-completion-at-point nil t)))
-;; (keymap-unset text-mode-map "C-M-i" t)
-
;;; Bind some keys
(add-hook 'completion-at-point-functions #'file-capf)
-;; (defun ispell-completion-at-point ()
-;; "Word completion function for use in `completion-at-point-functions'."
-;; (pcase (bounds-of-thing-at-point 'word)
-;; (`(,beg . ,end)
-;; (when (and (< beg (point)) (<= (point) end))
-;; (let ((word (buffer-substring-no-properties beg end)))
-;; (require 'ispell)
-;; (list beg end
-;; (completion-table-subvert
-;; (seq-remove
-;; (apply-partially #'string-equal-ignore-case word)
-;; (let ((inhibit-message t)) (ispell-lookup-words word)))
-;; word (downcase word))
-;; :annotation-function (lambda (_) " Dictionary word")
-;; :exclusive 'no))))))
-
;;; Configure highlighting of the current line via `lin'
(with-eval-after-load 'lin