-
Notifications
You must be signed in to change notification settings - Fork 3
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
Sorting order is confusing sometimes #13
Comments
Yes currently I use |
Ok, thank you for response! Maybe you can implement the ability to set custom comparator for sorting algo which can be set manually? So anybody would have instrument to tweak behavior a bit without bloody patching of original code? |
I have no many experience in elisp, but I can try to implement such thing and create a PR, don't you mind? |
I can |
Yes, sounds good! |
I added a post completion hook and tried to reverse the list myself. It worked on my side. But after I returned those results to company, looks like company has sorted them again. I wonder if there anything on company side that prevents me from specifying a specific order. |
company.el: (defun company--preprocess-candidates (candidates)
(cl-assert (cl-every #'stringp candidates))
(unless (company-call-backend 'sorted)
(setq candidates (sort candidates 'string<)))
(when (company-call-backend 'duplicates)
(company--strip-duplicates candidates))
candidates) Maybe I should create issue in the company-mode github repo = ( |
Strangely I already set |
Hello.
Assume we have some files:
SomeClass.h
SomeClass.cpp
main.cpp
I would like to unclude SomeClass.h into main.cpp, so:
main.cpp:
include "Some|
First candidate is .cpp file, but in 99% cases I would like to include .h, .hpp, .inl and other files, but not .cpp.
I think this is due to 'sort' function, and 'c' is smaller than 'h', right?
Is there any way to customize sorting behavior?
Thank you a lot!
The text was updated successfully, but these errors were encountered: