added company backends for latex
This commit is contained in:
parent
64859bdf46
commit
15b9959a7b
36
conf.org
36
conf.org
|
@ -426,7 +426,7 @@ NOTES:
|
||||||
- flycheck requries r-lintr
|
- flycheck requries r-lintr
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun nd/init-ess-company ()
|
(defun nd/init-ess-company ()
|
||||||
"Set the company modes for ess modes."
|
"Set the company backends for ess modes."
|
||||||
(setq-local company-backends '((company-R-objects company-R-args))))
|
(setq-local company-backends '((company-R-objects company-R-args))))
|
||||||
|
|
||||||
(use-package ess
|
(use-package ess
|
||||||
|
@ -472,11 +472,43 @@ NOTES:
|
||||||
(use-package company-ghc
|
(use-package company-ghc
|
||||||
:ensure t
|
:ensure t
|
||||||
:after
|
:after
|
||||||
(company-mode haskell-mode)
|
(company haskell-mode)
|
||||||
:hook
|
:hook
|
||||||
(haskell-mode . (lambda () (setq-local company-backends
|
(haskell-mode . (lambda () (setq-local company-backends
|
||||||
'((company-ghc))))))
|
'((company-ghc))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
*** latex
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(add-hook 'LaTeX-mode-hook #'flycheck-mode)
|
||||||
|
(add-hook 'Tex-latex-mode-hook #'flycheck-mode)
|
||||||
|
|
||||||
|
(defun nd/init-company-auctex ()
|
||||||
|
"Set the company backends for auctex modes."
|
||||||
|
(setq-local company-backends '((company-auctex-labels
|
||||||
|
company-auctex-bibs
|
||||||
|
company-auctex-macros
|
||||||
|
company-auctex-symbols
|
||||||
|
company-auctex-environments
|
||||||
|
;; company-latex-commands
|
||||||
|
company-math-symbols-latex
|
||||||
|
company-math-symbols-unicode))))
|
||||||
|
|
||||||
|
(use-package company-math
|
||||||
|
:ensure t
|
||||||
|
:after company
|
||||||
|
:config
|
||||||
|
(setq company-math-allow-unicode-symbols-in-faces '(font-latex-math-face)
|
||||||
|
company-math-disallow-latex-symbols-in-faces nil))
|
||||||
|
|
||||||
|
(use-package company-auctex
|
||||||
|
:ensure t
|
||||||
|
:after (company company-math)
|
||||||
|
:hook
|
||||||
|
((LaTeX-mode . company-mode)
|
||||||
|
(LaTeX-mode . nd/init-company-auctex)
|
||||||
|
(Tex-latex-mode . company-mode)
|
||||||
|
(Tex-latex-mode . nd/init-company-auctex)))
|
||||||
|
#+END_SRC
|
||||||
* org-mode
|
* org-mode
|
||||||
** major mode
|
** major mode
|
||||||
*** general config
|
*** general config
|
||||||
|
|
Loading…
Reference in New Issue