Eglot sorts initial completions by length, not relevance. When non-empty pattern given #1306
-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Initially I thought this was a clangd-only issue but now I think I can reproduce it with |
Beta Was this translation helpful? Give feedback.
-
Check |
Beta Was this translation helpful? Give feedback.
-
I can't reproduce this @MintSoup. You haven't provided any details of your configuration, and I recommend that you start with a bare-bones setup, i.e. a Anyway, here's my
Where
Inserting As you can see, they are not sorted according to length, but rather to the These are the labels and the scores that clangd assigns to each completion.
|
Beta Was this translation helpful? Give feedback.
-
OK, I reproduced the issue with your example file. Incidentally, I have to apologize to @zsxh, as their advice was right all along. A workaround to fix this is to remove
This is a bug in Eglot. |
Beta Was this translation helpful? Give feedback.
-
I fixed this in the Emacs master branch. For other Emacs versions, will be in the upcoming Eglot 1.16 release, but you can find it in GNU devel ELPA before that. |
Beta Was this translation helpful? Give feedback.
I fixed this in the Emacs master branch. For other Emacs versions, will be in the upcoming Eglot 1.16 release, but you can find it in GNU devel ELPA before that.