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

Add docs for cmp comperators #1674

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion doc/cmp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,42 @@ You can use the following configuration helpers:

cmp.config.compare~

TBD
*cmp.config.compare.length
The completion option would be ordered by length of string,
the shorter the string the upper it will be.

*cmp.config.compare.exact
If an exact option is found, it will be at the top.

*cmp.config.compare.recently_used
Order the options by how recently the completion option was used

*cmp.config.compare.locality
Local variables will be placed before variables imported from other files.
Same goes for any other code object.

*cmp.config.compare.score
TBD

*cmp.config.compare.kind
Each completion is of a specific type: variable, text, snippet, etc
Snippets always located on top.
Each other type gets a number (set by the one configuring the type) and compared with others.
Text kind is int 100.

*cmp.config.compare.sort_text
Sort by alphabetical order.

*cmp.config.compare.offset
TBD

*cmp.config.compare.order
TBD






cmp.config.context~

Expand Down