Skip to content

Commit 72fc63b

Browse files
committed
(mini.completion) Respect filterText from LSP response.
Details: - Resolves echasnovski/mini.nvim#306 (comment).
1 parent a95a7c0 commit 72fc63b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lua/mini/completion.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ MiniCompletion.config = {
243243
process_items = function(items, base)
244244
local res = vim.tbl_filter(function(item)
245245
-- Keep items which match the base and are not snippets
246-
return vim.startswith(H.get_completion_word(item), base) and item.kind ~= 15
246+
local text = item.filterText or H.get_completion_word(item)
247+
return vim.startswith(text, base) and item.kind ~= 15
247248
end, items)
248249

249250
table.sort(res, function(a, b) return (a.sortText or a.label) < (b.sortText or b.label) end)

0 commit comments

Comments
 (0)