Closed tam5 closed 6 years ago
When trying to complete, can you run M-x company-diag <RET>
and paste the result here?
In the config, I suggest:
company-capf
unless you need it for other languages.company-lsp-async
is t (should be the default value).company-lsp-cache-candidates
. Possible values are t, 'auto
, and nil@tigersoldier thanks for your response.
By switching company-lsp-cache-candidates
from auto to t
, i was able to get the filter to work properly almost all of the time, and this works great.
The only issue I have now, is that it seems to take a very long time (3+ seconds) for the completion results to appear. I am fairly certain the php language server itself is not causing the slowness, so is there another setting i might try to achieve better performance?
Here is a paste of company-diag
:
Emacs 26.1 (x86_64-apple-darwin17.5.0) of 2018-07-13 on Aris-MBP.nyc.rr.com
Company 0.9.6
company-backends: (company-lsp
(company-capf company-dabbrev))
Used backend: company-lsp
Major mode: php-mode
Prefix: ("" . t)
Completions: none(error fetching)
There is a message saying error fetching, and the list of completions here is empty. However, the list was populated before i hit M-x
. Maybe that is important.
I'm not sure what causes the long latency if it's not from php language server. You can try:
company-lsp-async
to t.company-idle-delay
to 0.1 (I don't think this will help though)I am having similar issue (delay) with python, see https://github.com/tigersoldier/company-lsp/issues/54.
@tam5, how did you rule out the language server?
Hi @vv111y, I know it is not the language server itself, because I can use the same language server with a different frontend and it works fine. For example, if you use VSCode, you can use the same language server, and even open up dev tools and see how quickly it does respond.
So, the issue must lie somewhere in translation from the language server and emacs, but I have not yet figured out where that is. I will look into it further and post my findings here.
Upon further investigation, it is php-language-server
itself that is too slow (2+ seconds for completion requets). I think VsCode might hide this by including other results in the completions.
There is already an issue on the php langauge server side to address this, so I guess that is where further discussion should go.
Completions do not filter down based on what I type. (for php at least)
It would also seem that they are extremely slow, which I only mention here in case it might be the same issue.
Here is what I am talking about:
My config:
Is there something I am missing?