Replace spell-fu with jinx
This commit is contained in:
parent
d0e5e85867
commit
ad563d4031
47
init.el
47
init.el
|
@ -590,57 +590,16 @@
|
|||
|
||||
(use-package meson-mode)
|
||||
|
||||
(use-package spell-fu
|
||||
:hook
|
||||
text-mode
|
||||
(org-mode . (lambda ()
|
||||
(setq spell-fu-faces-exclude
|
||||
'(org-block-begin-line
|
||||
org-block-end-line
|
||||
org-code
|
||||
org-date
|
||||
org-drawer org-document-info-keyword
|
||||
org-ellipsis
|
||||
org-link
|
||||
org-meta-line
|
||||
org-properties
|
||||
org-properties-value
|
||||
org-special-keyword
|
||||
org-src
|
||||
org-tag
|
||||
org-verbatim)))))
|
||||
(use-package jinx
|
||||
:hook text-mode)
|
||||
|
||||
(use-package minimap
|
||||
:custom-face
|
||||
(minimap-active-region-background ((t (:background unspecified :inherit hl-line))))
|
||||
:hook (minimap-sb-mode . turn-on-solaire-mode))
|
||||
|
||||
(defun my-magit-spell-fu-check-range (pos-beg pos-end)
|
||||
(spell-fu--overlays-remove pos-beg pos-end)
|
||||
(with-syntax-table spell-fu-syntax-table
|
||||
(save-match-data
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((check-end (-> (format "^%s -+ >8 -+$" comment-start)
|
||||
(re-search-forward pos-end t)
|
||||
(or pos-end)))
|
||||
(comment-start-char (aref comment-start 0)))
|
||||
(goto-char pos-beg)
|
||||
(while (< (point) check-end)
|
||||
(unless (= (char-after) comment-start-char)
|
||||
(let ((pos-line-end (pos-eol)))
|
||||
(while (re-search-forward spell-fu-word-regexp pos-line-end t)
|
||||
(let ((word-beg (match-beginning 0))
|
||||
(word-end (match-end 0)))
|
||||
(spell-fu-check-word word-beg word-end (match-string-no-properties 0))))))
|
||||
(forward-line)))))))
|
||||
|
||||
(use-package magit
|
||||
:hook (git-commit-setup . (lambda ()
|
||||
(git-commit-turn-on-auto-fill)
|
||||
(spell-fu-mode)
|
||||
(setq-local spell-fu-check-range #'my-magit-spell-fu-check-range)
|
||||
(spell-fu--time-ensure t))))
|
||||
:hook (git-commit-setup . git-commit-turn-on-auto-fill))
|
||||
|
||||
(use-package forge
|
||||
:after magit
|
||||
|
|
Loading…
Reference in a new issue