How to turn off company mode in org mode?
Asked Answered
G

2

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.

Ghost answered 7/1, 2016 at 10:24 Comment(1)
You should post on emacs.stackexchange.comAttune
A
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)
Attune answered 7/1, 2016 at 14:39 Comment(1)
This is broken now per issue. And none of methods work right now, I can only disable auto-completion layer completely.Loosing
T
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))
Tangential answered 7/1, 2016 at 16:25 Comment(2)
In order to turn off multiple modes can I just (another-mode -1) below of the (company-mode -1)?Cog
@Cog Yes, you can run whatever code you want in your hook function.Tangential
A
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)
Attune answered 7/1, 2016 at 14:39 Comment(1)
This is broken now per issue. And none of methods work right now, I can only disable auto-completion layer completely.Loosing

© 2022 - 2024 — McMap. All rights reserved.