Skip to content

Commit cdb8926

Browse files
saghengithub-actions[bot]
authored andcommitted
docs: update vimdocs
1 parent 138314a commit cdb8926

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

doc/blink-cmp.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*blink-cmp.txt* For NVIM v0.10.0 Last change: 2025 October 06
1+
*blink-cmp.txt* For NVIM v0.10.0 Last change: 2025 October 07
22

33
==============================================================================
44
Table of Contents *blink-cmp-table-of-contents*
@@ -1526,6 +1526,24 @@ In the example above:
15261526
- If still tied, they are sorted by label.
15271527

15281528

1529+
SORT LIST FUNCTION
1530+
1531+
Instead of specifying a static list, you may also provide a function that
1532+
returns a list of sorts.
1533+
1534+
>lua
1535+
fuzzy = {
1536+
sorts = function()
1537+
if vim.bo.filetype == "lua" then
1538+
return { 'score', 'label' } -- Prioritize label sorting for Lua files
1539+
else
1540+
return { 'score', 'sort_text', 'label' } -- Default sorting for other filetypes
1541+
end
1542+
end,
1543+
}
1544+
<
1545+
1546+
15291547
CUSTOM SORTING
15301548

15311549
You may also provide a custom Lua function to define your own sorting logic.

0 commit comments

Comments
 (0)