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

Option to turn off sorting #4

Closed
MaskRay opened this issue Feb 2, 2018 · 2 comments
Closed

Option to turn off sorting #4

MaskRay opened this issue Feb 2, 2018 · 2 comments

Comments

@MaskRay
Copy link

MaskRay commented Feb 2, 2018

ivy-xref can be used for language server protocol [workspace/symbol] and here is an example in cquery

The results are sorted on the server side and thus client-side sorting should be disabled.

ivy-xref.el:54
-    collection)))
+   (nreverse collection)))

I searched for set name but the best fit is listed at the bottom

syl20bnr/spacemacs#10211 adds ivy-xref to the +tools/lsp layer. It will be much appreciated if you could give some advice or push forward that PR (((

alexmurray added a commit that referenced this issue Feb 2, 2018
When using push we add to the front of the list so this means the resulting
collection is in the reverse order to the original xrefs - use nreverse to
destructively reorder collection so it will have the same order as the original
xrefs

Closes ticket #4
@alexmurray
Copy link
Owner

Thanks - I think it makes sense to always use nreverse since at the moment the result list is always in the opposite order to the original xrefs list.

Added in 4d2c437

@MaskRay
Copy link
Author

MaskRay commented Feb 2, 2018

Thanks. Another question is if :sort t in (ivy-read ...) will sort the results? It seems not in my workspace/symbol use case.

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