Open tzoz opened 4 years ago
Comapny-lsp is no longer supported. Delete that package and lsp-mode will pick company-capf.
Is there a way to have asynchronous completions with company-capf?
it is async ootb.
I mean, the implementation does not block but it is not async.
I tried with company-capf, and it did in fact block while waiting for completions. For large projects, this block can be for more than 10 seconds, which is unacceptable. If you can show how to prevent this, that would be helpful. I am still using company-lsp because it does exactly that.
company-capf does not block. Most likely something else is blocking. Please follow https://emacs-lsp.github.io/lsp-mode/page/performance/
@yyoncho
company-capf does not block
This does not mirror my experience, see this issue: https://github.com/company-mode/company-mode/issues/1073
As soon as I do M-:
(setq company-backends (remove 'company-capf company-backends))
I no longer have any blocking, and completions are working 100%.
Commenting out this line seems to resolve my problem: https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-completion.el#L774
I don't understand why company-lsp
is not supported anymore, when it clearly supports asynchronous completions and company-capf
doesn't. Am I doing something wrong?
It seems that updates to
lsp-mode
have changed the names of these functions. I worked around this issue by adding the following code to myinit.el
:Though it would be better for a PR to use the new names instead.