Search code examples
remacsautocompleteess

Enable Company mode for all buffers but ESS


Is there a way to enable Company mode in all buffers...

;; enable Company mode in all buffers
(add-hook 'after-init-hook 'global-company-mode)

... except the ESS ones (as, there, Auto-Complete is enabled by default, and in fact much better -- with the quick help, that is documentation appearing in a tooltip)?


Solution

  • Customize company-global-modes accordingly:

    (setq company-global-modes '(not ESS-MODE))
    

    Where ESS-MODE is to be replaced with the value of major-mode (as in C-h v major-mode) in ESS buffers.

    Also, note that Company can use completion sources of Auto-Complete, and provides a quick help feature as well (press F1 while the completion popup is shown), so you can also use Company in ESS, if you want.