New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp-completion-at-point
short-circuits the completion function chain
#4386
Comments
lsp-completion-at-point
shortcuts the completion function chainlsp-completion-at-point
short-circuits the completion function chain
Back when we started we were discussing how to make the lsp-mode configuration work the decision was to create a default configuration and allow the user to turn it off when the default configuration does not work for them or provide an extension point to make the custom adjustments. You would agree that we cannot support all possible configurations OOTB. In this particular case, you may use Let me know if that works for you. |
Yes, I can for sure make that work. I would argue that lsp-mode should partake better in the completion function chain, but I can work around the issue using the hook. Thanks for the quick answer! |
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
After adding my own function to
completion-at-point-functions
it turns out thatlsp-completion-at-point
shortcuts the completion function chain when it does not find any completions of its own.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.One way to work around that would be to ensure that lsp-mode appends instead of prepends its function to the list. Now it places itself in front of everything else, blocking them.
Steps to reproduce
Expected behavior
If lsp-mode can't complete, let the other completion functions have a go - OR wait with lsp-mode completions until the end.
Which Language Server did you use?
Not relevant.
OS
MacOS
Error callstack
No error call stack.
Anything else?
I realize the way lsp works might not mesh very well with how emacs completion works. I would assume that is why it is not being a "good citizen" with the other completion functions in the list. Maybe an option would be to move lsp-completion to the end of the chain.
The text was updated successfully, but these errors were encountered: