9

I'm using spacemacs and tried to turn off company mode in org mode while keeping it in other major modes. I've tried the following:

(global-company-mode '(not org-mode))

but it's not working.

Michael Guo
  • 93
  • 1
  • 5

2 Answers2

19

Disable from org-mode-hook (this method will work with pretty much any globalized minor mode and major mode):

(defun jpk/org-mode-hook ()
  (company-mode -1))
(add-hook 'org-mode-hook #'jpk/org-mode-hook)

Or use company's configuration variable:

(setq company-global-modes '(not org-mode))
jpkotta
  • 9,237
  • 3
  • 29
  • 34
8

At the Spacemacs configuration layer level you can disable auto-completion layer for a set of layers with the following line in dotspacemacs-configuration-layers (for instance disabling auto-completion for both org and git)

(auto-completion :disabled-for org git)
syl20bnr
  • 286
  • 3
  • 4
  • This is broken now per [issue](https://github.com/syl20bnr/spacemacs/issues/14835). And none of methods work right now, I can only disable auto-completion layer completely. – Yuji Feb 04 '23 at 19:59