From c502fe6328ec3940c13879db4abff2cb079eae14 Mon Sep 17 00:00:00 2001 From: Patrick Elliott Date: Wed, 18 Jul 2018 17:20:52 +0200 Subject: [PATCH] Added +unicode-math flag --- modules/lang/latex/config.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 031dca7e4..052422ebf 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -89,13 +89,18 @@ :when (featurep! :completion company) :defer t :init - (add-to-list '+latex--company-backends 'company-math-symbols-latex nil #'eq)) + (if (featurep! +unicode-math) + (add-to-list '+latex--company-backends 'company-math-symbols-unicode nil #'eq) + (add-to-list '+latex--company-backends 'company-math-symbols-latex nil #'eq))) (when +latex--company-backends ;; 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 ;; not something `set-company-backend!' anticipates (and shouldn't have to!) (add-hook! 'LaTeX-mode-hook + (when (featurep! +unicode-math) + (setq-local company-math-allow-unicode-symbols-in-faces (quote (tex-math font-latex-math-face))) + (setq-local company-math-disallow-unicode-symbols-in-faces nil)) (add-to-list (make-local-variable 'company-backends) +latex--company-backends)))