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

odd completion results order #515

Open
myrgy opened this issue Oct 30, 2019 · 3 comments
Open

odd completion results order #515

myrgy opened this issue Oct 30, 2019 · 3 comments

Comments

@myrgy
Copy link

myrgy commented Oct 30, 2019

Hi @MaskRay ,

I noted one thing with completion:
inside function I enter a few symbols for local variable or class member, but usually I have function from std/keywords instead of local stuff.

image

image

Same thing happens I I have local variable and type with similar names:
image

I would expect, that when I enter something, that matches with results by case(eg log, not Log) I will have local variable on top.
But I enter something with different cases- then I would expect best match.

Seems like with types it works as expected:
image

Thank you in advance!

source code: https://bitbucket.org/myrgy/rhino/src/develop/
ccls version: 3e04997

@myrgy
Copy link
Author

myrgy commented Oct 30, 2019

Just noted that ccls was compiled with llvm8, recompiled with llvm9,

but still have functions on top:
image

@MaskRay
Copy link
Owner

MaskRay commented Nov 2, 2019

At demo/src/main.cpp:18, after typing logg, the completion items I get are:

logg
LONG_LONG_MAX
LONG_LONG_MIN

It looks like you may have some company plugins that do its own sorting?


If my understanding is correct, you prefer the variable logger to other std functions/macros. The fuzzy string matching already assigns some weight to the completion items, we probably need a generic mechanism that assigns different weights to SymbolKind and combine the two signals, but I'm not very clear how to do that.

@myrgy
Copy link
Author

myrgy commented Nov 3, 2019

I use doom emacs, which don't enable any special company plugins.

Yes, I think we use our types and variables more frequently than std functions. So for convince I'd like so see it on top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants