Giter Site home page Giter Site logo

Comments (2)

minad avatar minad commented on August 20, 2024 2

However, when using Corfu, in the same situation, lambda is the first candidate. I think Corfu's behavior is the desired one. Any idea how could I fix this problem?

There is no problem - just use Corfu ;)

from orderless.

oantolin avatar oantolin commented on August 20, 2024 1

Orderless does no sorting at all! Completion UIs (like Corfu and Company) can sort, and the underlying capf, in this case elisp-completion-at-point might do some sorting of their own.

  • A quick persual of elisp-completion-at-point suggests it does not provide either cycle-sort-function or display-sort-function metadata, so it's not sorting either.

  • Sorting in Corfu is configurable (see corfu-sort-function) and defaults to sorting first by length and breaking ties alphabetically.

  • I don't use company and don't have it installed, but a very superficial look at its repository suggests its sorting is configurable too, controlled by the variable company-transformers and defaults to alphabetical sorting.

So, I wouldn't say "I think Corfu's behavior is the desired one", probably it's more correct to say "Corfu and Company chose different defaults". If you find Corfu's default sorting better (I think I would), I suggest you set company-transformers to '(corfu-sort-length-alpha) (which I believe I should work). But also check out the other options Corfu and Company suggest, you may find a type of sorting you find even more useful. Company's company-sort-by-occurrence sounds pretty useful.

from orderless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.