Skip to content

Instantly share code, notes, and snippets.

@metamorph
Created May 8, 2015 09:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save metamorph/69f37f7686164e7c4d94 to your computer and use it in GitHub Desktop.
Save metamorph/69f37f7686164e7c4d94 to your computer and use it in GitHub Desktop.
Spacemacs - disable flyspell by default
;; Remove fly-spell for markdown and text-files.
(remove-hook 'text-mode-hook 'enable-flyspell-mode)
(remove-hook 'markdown-mode-hook 'enable-flyspell-mode)
(defun spacemacs/init-flyspell ()
(defun enable-flyspell-mode ()
(flyspell-mode 1))
(use-package flyspell
:defer t
:init
(progn
(setq-default ispell-program-name "aspell")
(setq-default ispell-dictionary "english")
(add-hook 'markdown-mode-hook 'enable-flyspell-mode)
(add-hook 'text-mode-hook 'enable-flyspell-mode)
(spacemacs|add-toggle spelling-checking
:status flyspell-mode
:on (flyspell-mode)
:off (flyspell-mode -1)
:documentation
"Enable flyspell for automatic spelling checking."
:evil-leader "ts"))
:config
(progn
(flyspell-prog-mode)
(spacemacs|diminish flyspell-mode " ⓢ" " s"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment