Skip to content

Commit

Permalink
chore: fit to blink v0.11.0
Browse files Browse the repository at this point in the history
Use `should_show_items` to decide whether to show items.
  • Loading branch information
Kaiser-Yang committed Jan 27, 2025
1 parent 2b97314 commit 7c6cfa3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/blink-cmp-git/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ function GitSource:get_completions(context, callback)
end)
end
---@diagnostic disable-next-line: param-type-mismatch
if not self:should_show_completions(context, nil) then
if not self:should_show_items(context, nil) then
transformed_callback()
return function() end
end
Expand Down Expand Up @@ -371,9 +371,8 @@ function GitSource:get_completions(context, callback)
return cancel_fun
end

-- HACK: the blink.cmp does not call this function
--- @param context blink.cmp.Context
function GitSource:should_show_completions(context, _)
function GitSource:should_show_items(context, _)
return context.trigger.initial_kind == 'trigger_character' and context.mode ~= 'cmdline'
and vim.tbl_contains(self:get_trigger_characters(), context.trigger.initial_character)
end
Expand Down

0 comments on commit 7c6cfa3

Please sign in to comment.