Closed hongyi-zhao closed 3 years ago
Diag shows that company-backends
is set to a different value: (company-capf)
.
Why? Probably because Eglot changes its value.
Try (add-to-list 'eglot-stay-out-of 'company)
.
Try (add-to-list 'eglot-stay-out-of 'company).
Yes, this is the correct action. Be aware you're now responsible for managing company-capf
in the company-backends
list, Eglot is no longer managing that part of the buffer for you.
Thanks a lot. I try to use the following configuration, and it really does the trick:
(use-package eglot
:hook
((TeX-mode . eglot-ensure))
:config
(add-to-list 'eglot-stay-out-of 'company)
(add-to-list 'eglot-server-programs
'((latex-mode tex-mode context-mode texinfo-mode bibtex-mode) . ("texlab"))))
@joaotavora BTW, now that company-clang
is behind company-capf
in company-backends
by default, you can probably remove this change of settings: Eglot should work well with the default config.
If you happen to use Eglot + other servers, this affects them too. Recently the C++/C modes clangd
server had some problems where some Company backend would interfere with company-capf
. I suppose they have been fixed.
ah, I was just commenting about that. I think it's safest to keep this for a while.
But I also found that some commands still couldn't be completed, as shown below.
The \bra
command which is defined in braket
package can't be completed:
The \href
command which is defined in hyperref
package can't be completed:
But I also find that there are some commands still can't be completed, as shown below.
I didn't have a change to comment on this, but it looks like you completely skipped the issue reporting template. If you wish an issue to be analysed, you may not do that. Open a new issue and describe everything accurately as requested. If you can't do that for one reason or another, it's better to open a new discussion item, as the template will advise.
Yep. This issue was created from a blank one. I opened a new issue.
Another problem is the above configuration can't do the partial match search, say, when I input \arrow
, I want to see all the LaTeX commands which includes arrow
in it.
Based on further tries, this feature is supplied by the following backends:
company-ispell company-capf
But it seems that the first backend that provides the match results takes effect, so there is no way to achieve the aims I described here.
On Ubuntu 20.04, I use the self-compiled git master version of Emacs and the following configuration to do the testing:
But I find that the above configuration failed to activate the company-math and company-ispell for LaTeX environment, as shown below:
Any hints for this problem?
Regards, HY