Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

completion-regexp-list is not respected #725

Closed
jdtsmith opened this issue Sep 3, 2021 · 1 comment
Closed

completion-regexp-list is not respected #725

jdtsmith opened this issue Sep 3, 2021 · 1 comment

Comments

@jdtsmith
Copy link

jdtsmith commented Sep 3, 2021

  • Server used: python-lsp-server
  • Emacs version: GNU Emacs 27.2
  • Operating system: MacOS
  • Eglot version: 20210901.917
  • Eglot installation method: package-install
  • Using Doom: No

The basic completion docs for try-completion (also applying to test-completion, all-completions, etc.) state (emphasis added):

In addition, to be acceptable, a completion must also match all the
regular expressions in ‘completion-regexp-list’. (Unless
COLLECTION is a function, in which case that function has to handle
‘completion-regexp-list’ itself
.)

The COLLECTION function provided by eglot does not appear to consider completion-regexp-list. This variable is important for completion styles such as orderless, which put completion-regexp-list to heavy work for candidate refinement. Since most in-built completion tables are obarrays, alists, hashes, etc., the issue really only pertains to programmed completion, such as in eglot. I have a small patch to the proxies lambda which implements this, and works well in my testing. Let me know if you'd like to see a PR. See also oantolin/orderless#78. Thanks for eglot!

@jdtsmith jdtsmith changed the title `completion-regexp-list' is not respected completion-regexp-list is not respected Sep 3, 2021
@nemethf
Copy link
Collaborator

nemethf commented Sep 3, 2021

In Emacs version 26.1, the docstring at the end of try-completion says: Additionally to this predicate, ‘completion-regexp-list’
is used to further constrain the set of candidates. To me, this means that try-completion internally takes care of filtering candidates according to completion-regexp-list. However, Eglot doesn't use all-completion. Isn't that the root cause of this issue?

I'm guessing here, but appropriately changing cl-remove-if-not to all-completion after the "all-completion" comment might just fix the issue.

Repository owner locked and limited conversation to collaborators Sep 3, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants