Skip to content
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 #5103

Closed
losnappas opened this issue Dec 10, 2022 · 2 comments
Closed

gopls completions re-ordered #5103

losnappas opened this issue Dec 10, 2022 · 2 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@losnappas
Copy link

losnappas commented Dec 10, 2022

Summary

joaotavora/eglot#576

That bug also happens in helix. Completions get reordered.

package main

func fooBar() {}

func _() {
	var sbp string
	var s struct { blah int }
	var _ int = sb.
}

Helix:

image

Vscode:

image

The suggestion by gopls is sorted correctly (because of the type int), but helix pushes it to 2nd.

Reproduction Steps

golang.org/x/tools/gopls v0.10.1
golang.org/x/tools/[email protected] h1:JoHe17pdZ8Vsa24/GUO8iTVTKPh0EOBiWpPop7XJybI=

Helix log

No response

Platform

Linux

Terminal Emulator

irrelevant

Helix Version

helix-term 22.12 (d14de27)

@losnappas losnappas added the C-bug Category: This is a bug label Dec 10, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Dec 14, 2022
@pascalkuthe
Copy link
Member

Completion ordering is editor dependent and depends on the exact fuzzy matching algorithm. Order differing between editors is expected and ok

The only exceptions are incomplete completion requests. That is tracked in #9797 so closing as duplicate of that

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@losnappas
Copy link
Author

But it's making incompatible completions. In my example it's giving a string to an int, it isn't semantically aware. I would hope to be able to turn the ordering off completely, since it's being more harm than good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants