latex layer: add company-reftex

This commit is contained in:
et2010 2018-04-25 21:26:58 +08:00 committed by duianto
parent 95940a64ee
commit 2e6e69eeff
2 changed files with 11 additions and 2 deletions

View File

@ -1688,6 +1688,7 @@ Other:
(thanks to Matt Kramer)
- Enable auto indent when paste. Remove =latex-mode= from
=spacemacs-yank-indent-modes= to disable it (thanks to bet4it)
- Added support for =company-reftex= (thanks to et2010)
**** Lua
- Added support for auto-completion with =company= (thanks to halfcrazy)
**** Language Server Protocol (LSP)

View File

@ -14,6 +14,7 @@
auctex
(auctex-latexmk :toggle (string= "LatexMk" latex-build-command))
(company-auctex :requires company)
(company-reftex :requires company)
evil-matchit
(reftex :location built-in)
flycheck
@ -144,13 +145,20 @@
:defer t
:init (spacemacs|add-company-backends
:backends
company-auctex-labels
company-auctex-bibs
(company-auctex-macros
company-auctex-symbols
company-auctex-environments)
:modes LaTeX-mode)))
(defun latex/init-company-reftex ()
(use-package company-reftex
:defer t
:init (spacemacs|add-company-backends
:backends
company-reftex-labels
company-reftex-citations
:modes LaTeX-mode)))
(defun latex/post-init-evil-matchit ()
(add-hook 'LaTeX-mode-hook 'evil-matchit-mode))