Skip to content

fix: show_signature now ignores trigger.enabled if called directly #1946

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lua/blink/cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function cmp.is_signature_visible() return require('blink.cmp.signature.window')
function cmp.show_signature()
local config = require('blink.cmp.config').signature
if not config.enabled or cmp.is_signature_visible() then return end
vim.schedule(function() require('blink.cmp.signature.trigger').show() end)
vim.schedule(function() require('blink.cmp.signature.trigger').show({ force = true }) end)
return true
end

Expand Down
4 changes: 2 additions & 2 deletions lua/blink/cmp/signature/trigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
--- @field activate fun()
--- @field is_trigger_character fun(char: string, is_retrigger?: boolean): boolean
--- @field show_if_on_trigger_character fun()
--- @field show fun(opts?: { trigger_character: string })
--- @field show fun(opts?: { trigger_character: string, force?: boolean })
--- @field hide fun()
--- @field set_active_signature_help fun(signature_help: lsp.SignatureHelp)

Expand Down Expand Up @@ -120,7 +120,7 @@ function trigger.show_if_on_trigger_character()
end

function trigger.show(opts)
if not config.enabled then return end
if not opts.force and not config.enabled then return end

opts = opts or {}

Expand Down