reddit / emacs

How do I disable spell checking in shell buffers?

xircon · 2022-02-06 13:11
Fairly pointless to have spell checking turned on in shell buffers (vterm & eshell, via aweshell). My internet foo is weak today :smile: Tried: ``` (remove-hook 'eshell-mode-hook #'flyspell-prog-mode) (remove-hook 'eshell-mode-hook #'spell-fu-mode) (add-hook 'eshell-mode-hook (lambda () (flyspell-prog-mode -1))) (add-hook 'vterm-mode-hook (lambda () (flyspell-prog-mode -1))) ``` As examples, but they don't work.
deaddyfreddy · 2022-02-06 16:05
how do you enable it? maybe it's easier to turn it on for prog-mode/text-mode only?
xircon · 2022-02-06 20:30
Good idea will give it a go.
xircon · 2022-02-06 20:46
Nope. Tried: ``` (use-package flyspell :ensure t :straight t :config (add-hook 'prog-mode-hook 'flyspell-mode)) ``` Still getting underlining in vterm & aweshell.
deaddyfreddy · 2022-02-06 21:55
not related, but one doesn't use :ensure and :straight together, and there's also :hook keyword
deaddyfreddy · 2022-02-06 21:56
try to not enable hooks at all and just run M-x flyspell-mode manually, will it affect vterm in such case?
xircon · 2022-02-06 22:04
Yeh, just knocked it together quickly, hadn't spotted my error.
xircon · 2022-02-06 22:10
Looks like one of my (poor) attempts to fix this has broken a lot more in my config, going to have to break it down and remove all the crud I just put in.
7890yuiop · 2022-02-08 09:50
Spell checking isn't enabled in *any* buffers by default, so... find where you're enabling it and address the problem there.