Fix company-auctex not initializing properly in Auctex buffers #326
Caused because AucTex's LaTeX-mode reports its major-mode as 'latex-mode. A check in :company-backends expects major modes to have matching hooks (e.g. LaTeX-mode-hook => LaTeX-mode).
This commit is contained in:
parent
88f8c27a7d
commit
feff92c626
1 changed files with 6 additions and 1 deletions
|
@ -40,7 +40,12 @@
|
|||
(def-package! company-auctex
|
||||
:when (featurep! :completion company)
|
||||
:init
|
||||
(set! :company-backend 'LaTeX-mode '(company-auctex))))
|
||||
;; We can't use the (set! :company-backend ...) because Auctex reports its
|
||||
;; major-mode as `latex-mode', but uses LaTeX-mode-hook for its mode, which
|
||||
;; is :company-backend doesn't anticipate (and shouldn't have to!)
|
||||
(add-hook! LaTeX-mode
|
||||
(make-variable-buffer-local 'company-backends)
|
||||
(company-auctex-init))))
|
||||
|
||||
|
||||
(def-package! reftex ; built-in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue