-
Notifications
You must be signed in to change notification settings - Fork 202
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
gopls completions re-ordered #576
Comments
as soon as you enable the There's no way to tweak that algorithm, and at any rate in would not be done in Eglot. |
(Full disclosure, I wrote the flex algorithm in Emacs, too) |
I see, thanks. gopls does a lot of type aware candidate ordering, so ideally the client would not re-order candidates at all based purely on text matching. Previously VSCode had the same issue so gopls worked around it by giving all candidates the same "filterText" to trick VSCode into not re-ordering anything. That hack has since been removed from gopls. Is there any good way forward with this? |
Don't know. A first instinct seems to be to have a But the Go LS is already prefiltering the results, so one wouldn't have that problem. On the other hand, other servers might not prefilter stuff. Let's leave this issue open and maybe someone wants to comment. @monnier usually has useful things to say about completion styles and sorting. Anyway, can you confirm that invoking company manually without (without any prefix text) displays the available candidates in the order that the Go LS intended them? |
Yes, confirmed. |
Hello again.
With gopls/company-mode I'm seeing eglot re-order the top completion candidate:
Completing at
<>
I expect to see "s.blah" as the top candidate (because the type matches) but I see "sbp".The text was updated successfully, but these errors were encountered: