You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently lsp-mode aggressively inserts the company-capf backend (which contains its completion-at-point-function) as the ultimate first item of the list of company-backends. If a language server does not provide all the functionality, that could otherwise be provided by another Company backend like company-files for example, lsp-mode will practically block any other Company backend inside company-backends from running, because it tells Company that it may be able to complete at point but in the end doesn't provide any completion candidates. This is not ideal and users may want to manage company-backends by themselves. Also using this new lsp-layer variable within some language layers, we could also be able to provide a more focused list of Company backends for that mode that extends the functionality currently not provided by the language server.
I know that this is currently done when not using the lsp backend, but like I said, if a language server does not provide the full spectrum of completion goodness, we could maybe use another backend in conjunction with company-capf.
After my investigation there are currently two possible solutions:
Introduce a new lsp-layer variable that sets lsp-completion-provider to :none and then merge the backends in Company with :separate
Add an advice around lsp-completion-at-point to make it non-exclusive, so company-capf does not block the next backend from trying to complete (this only works if company-capf is part of some grouping and not a single element like it is when lsp-mode adds company-capf)
Maybe this also is just an issue with lsp-mode itself and I should create an issue to introduce a switch to turn on non-exclusivity for lsp-completion-at-point?!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi folks!
Currently lsp-mode aggressively inserts the
company-capf
backend (which contains its completion-at-point-function) as the ultimate first item of the list ofcompany-backends
. If a language server does not provide all the functionality, that could otherwise be provided by another Company backend likecompany-files
for example, lsp-mode will practically block any other Company backend insidecompany-backends
from running, because it tells Company that it may be able to complete at point but in the end doesn't provide any completion candidates. This is not ideal and users may want to managecompany-backends
by themselves. Also using this new lsp-layer variable within some language layers, we could also be able to provide a more focused list of Company backends for that mode that extends the functionality currently not provided by the language server.I know that this is currently done when not using the lsp backend, but like I said, if a language server does not provide the full spectrum of completion goodness, we could maybe use another backend in conjunction with
company-capf
.After my investigation there are currently two possible solutions:
lsp-completion-provider
to:none
and then merge the backends in Company with:separate
lsp-completion-at-point
to make it non-exclusive, socompany-capf
does not block the next backend from trying to complete (this only works ifcompany-capf
is part of some grouping and not a single element like it is when lsp-mode addscompany-capf
)Maybe this also is just an issue with lsp-mode itself and I should create an issue to introduce a switch to turn on non-exclusivity for
lsp-completion-at-point
?!What do you guys think?
Beta Was this translation helpful? Give feedback.
All reactions