Skip to content

allow setting the completions menu sorter#39

Open
justinkb wants to merge 1 commit into
daanx:mainfrom
justinkb:set-sorter
Open

allow setting the completions menu sorter#39
justinkb wants to merge 1 commit into
daanx:mainfrom
justinkb:set-sorter

Conversation

@justinkb
Copy link
Copy Markdown
Contributor

an application using isocline might want arbitrarily complex sorting rules for its completions, say, based on Markov chains or even a neural network. or the application might wanna allow its users to pin certain common completions at the top.

in any case, if the application had already done the domain specific sorting before the completions are being passed to isocline, let's give them the option to make isocline not override that sorting. you've wisely decoupled that completions menu sorting from the prefix finding all along, so this change is perfectly safe.

kept this simple, allowing setting the sorter to NULL, but we might also provide other builtin sorters users can pick from if they don't want the case insensitive shortlex.

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

Successfully merging this pull request may close these issues.

1 participant