Open hongyi-zhao opened 3 years ago
Comment out the following two lines in the above configuration seems to solve this problem:
(setq-local company-math-disallow-unicode-symbols-in-faces nil)
(setq-local company-math-allow-latex-symbols-in-faces nil)
But some commands, say, \bra
, can't be completed in math mode:
While they can be completed in text mode:
(append '((company-math-symbols-latex company-math-symbols-unicode company-auctex-environments
company-auctex-macros company-capf company-ispell company-latex-commands
company-abbrev company-bbdb company-dabbrev-code company-dabbrev
company-files company-keywords company-semantic
))
This doens't seem right to me, but if it works for you ok. All those backends are triggered simultaneously. The point of company backends is that if the first ones don't find it, the following ones are triggered. company-math
backends start with \
prefix, if there is no prefix they are not triggered.
But some commands, say, \bra, can't be completed in math mode:
Bra completion is not comming form company math. Probably from company-capf which triggers auctex completion and it looks in braket.sty file (just a guess). So it's not a company-math issue.
Comment out the following two lines in the above configuration seems to solve this problem:
Yes, you need to look at company-math custom variables and configure as you see fit.
This doens't seem right to me, but if it works for you ok.
What's your working configuration?
I do (add-to-list 'company-backends 'company-math-symbols-unicode)
globally and
(setq-local company-backends
(append '((company-math-symbols-latex
company-latex-commands))
company-backends))
In latex mode.
If you want the normal human writing completion, the following backend should be appended to the list too:
company-ispell
But even so, there are still many commands that cannot be completed., as I've described here.
The testing configuration:
Obviously, this is not the desired result.
Any hints for this problem?
Regards, HY