joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.23k stars 139 forks source link

Completions with company end up showing all symbols when nothing is matching #535

Closed darthdeus closed 1 year ago

darthdeus commented 1 year ago

When I try to complete any name/symbol I get a list of all possible symbols when the current completion doesn't match anything, as the gif below shows. This only happens with Sly, and not any other modes/languages. I'm not really sure how to go about diagnosing it, or if it's a bug?

sly-completion (1)

joaotavora commented 1 year ago

Impossible to tell without a reproduction recipe, sorry

darthdeus commented 1 year ago

In an attempt to provide a small reproduction example I managed to narrow it down to https://github.com/oantolin/orderless causing this. I'm not exactly sure why yet, but it doesn't look like it has anything to do with sly, so I'll close the issue for now and re-open with an example if I run into a specific way to reproduce this.

It does still only happen with lisp-mode and only when I have sly, but it feels more about how orderless interacts with the completion, rather than sly returning something wrong.

If anyone else runs into this seeing this issue, one part of triage I've done that may be useful is that in Doom Emacs this happens when company and either helm or vertico modules are enabled, the ivy and ido modules don't cause this, and company on its own does not cause it either. I'm mainly focusing on making this work with vertico, which is where orderless comes in, because Doom's vertico layer installs orderless. Likely none of this is related to Sly, but posting it here just in case, especially since Doom only supports Sly and not SLIME (at least out of the box).

edit: My temporary workaround (for anyone with the same issue reading this) is replacing vertico with (helm +fuzzy), since that doesn't use orderless and also doesn't seem to cause the same problem.