Skip to content

Conversation

@clarendonlabs
Copy link

… function chain

lsp-completion-mode will make a buffer-local version of the `completion-at-point-functions' list and will add `lsp-completion-at-point' to the head of the list if that symbol is not already present. However, an `lsp-unconfigure-hook' is called which results in removal of `lsp-completion-at-point' from the buffer-local version. The next time `lsp-completion-mode' runs, `lsp-completion-at-point' is added to the head of the `completion-at-points-functions'. To fix, a flag variable is set whose use prevents `lsp-completion-at-point' from removed from `completion-at-point-functions' if it was present at the start. 
…nction chain lsp-completion-mode will make a buffer-local version of the `completion-at-point-functions' list and will add `lsp-completion-at-point' to the head of the list if that symbol is not already present. However, an `lsp-unconfigure-hook' is called which results in removal of `lsp-completion-at-point' from the buffer-local version. The next time `lsp-completion-mode' runs, `lsp-completion-at-point' is added to the head of the `completion-at-points-functions'. To fix, a flag variable is set whose use prevents `lsp-completion-at-point' from removed from `completion-at-point-functions' if it was present at the start.
@clarendonlabs
Copy link
Author

Following an email with Kien Nguyen, I’ve generated a PR for a possible fix to the short-circuiting issue#4386 reported earler.

@wyuenho
Copy link
Contributor

wyuenho commented Jan 20, 2025

If you read the docstring for completion-at-point-functions, the plist lsp-completion-at-point returns can include a kvp :exclusive 'no to achieve what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants