File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 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==============================================================================
44Table 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+
15291547CUSTOM SORTING
15301548
15311549You may also provide a custom Lua function to define your own sorting logic.
You can’t perform that action at this time.
0 commit comments