Fork me on GitHub
#lsp
<
2024-03-20
>
magnars08:03:31

After adding my own function to completion-at-point-functions it turns out that lsp-completion-at-point shortcuts the completion function chain when it does not find any completions of its own. Is this intentional?

ericdallo11:03:27

Good question, I think this is a old behavior not sure if it's intentional

magnars11:03:35

A completion at point-function can return nil to pass on the completion, allowing the next completion function in line to try. I think maybe lsp-completion-at-point always returns a lambda, which then would short-circuit the others in the list.

magnars11:03:01

One way to work around that would be to ensure that lsp-mode appends instead of prepends to the list. Now it places itself in front of everything else.

lassemaatta11:03:44

It would be nice to get this fixed/changed. It feels a bit clunky to manually adjust the capfs if I want something like cape-file to work when using LSP. I always assumed there must be some higher purpose for the existing behaviour 🙂

ericdallo12:03:04

I see, if any of you could open a lsp-mode issue would help understand from other maintainers why this behavior