Open kurnevsky opened 2 years ago
Thanks for reporting! That's a definitely an ordering bug
I dug into it a bit and it seems that Int
is showing up later because the symbol that we get is actually an Int
object and BigInt is a field. We prioritize fields which is causing this issue. I tried to fix it in:
https://github.com/scalameta/metals/compare/main...tgodzik:fix-int?expand=1
but I am not sure about this fix :/
If sorting in vscode is good enough, then probably we can just replicate it on metals side? :)
@tgodzik oh, I got what are you about. Maybe we can try to fix by it keeping a symbol in filterInteresting
that has a less relevance?
Describe the bug
It seems vscode applies its own ordering in completion but it might affect other editors (i.e. emacs). When you write
def f(x: Int)
you get the following completion response for Int:Integral has sortText
00000
and Int00002
.Expected behavior
Int is prioritized over Integer.
Operating system
Linux
Editor/Extension
Emacs (lsp-metals)
Version of Metals
0.11.6
Extra context or search terms
emacs completion ordering