Browse Source

Emacs: Add spell checker toggle function

master
Riyyi 2 years ago
parent
commit
b87f56abcf
  1. 1
      .config/emacs/config.org
  2. 13
      .config/emacs/config/development.org

1
.config/emacs/config.org

@ -1065,6 +1065,7 @@ General.el ~leader key binds.
"t k" '(centaur-tabs-select-beg-tab :which-key "Tab select last") "t k" '(centaur-tabs-select-beg-tab :which-key "Tab select last")
"t l" '(centaur-tabs-forward-group :which-key "Tab forward group") "t l" '(centaur-tabs-forward-group :which-key "Tab forward group")
"t n" '(neotree-toggle-in-project-root :which-key "Toggle Neotree") "t n" '(neotree-toggle-in-project-root :which-key "Toggle Neotree")
"t s" '(dot/flyspell-toggle :which-key "Toggle spell checker")
"t w" '(visual-line-mode :which-key "Toggle line wrapping") "t w" '(visual-line-mode :which-key "Toggle line wrapping")
;; Update packages ;; Update packages

13
.config/emacs/config/development.org

@ -416,7 +416,18 @@ Give Flyspell a selection menu.
:hook (org-mode . flyspell-mode) :hook (org-mode . flyspell-mode)
:config :config
(setq flyspell-issue-message-flag nil) (setq flyspell-issue-message-flag nil)
(setq flyspell-issue-welcome-flag nil)) (setq flyspell-issue-welcome-flag nil)
(defun dot/flyspell-toggle ()
"Toggle Flyspell, prompt for language."
(interactive)
(if (symbol-value flyspell-mode)
(flyspell-mode -1)
(call-interactively 'ispell-change-dictionary)
(if (derived-mode-p 'prog-mode)
(flyspell-prog-mode)
(flyspell-mode))
(flyspell-buffer))))
#+END_SRC #+END_SRC
**** Rainbow Delimiters **** Rainbow Delimiters

Loading…
Cancel
Save