Skip to content
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

ctx.trigger.initial_kind resets unexpectedly #803

Closed
2 tasks done
nowaylifer opened this issue Dec 27, 2024 · 0 comments
Closed
2 tasks done

ctx.trigger.initial_kind resets unexpectedly #803

nowaylifer opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working trigger Module which decides when to show windows

Comments

@nowaylifer
Copy link

nowaylifer commented Dec 27, 2024

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

I use should_show_items option in snippets provider config to hide snippets when completion menu is triggered by trigger character or manually (config below). So it works ok until I type second character after triggering completion menu. As seen in debug log, ctx.trigger.initial_kind unexpectedly changes from 'trigger_character' or 'manual' to 'keyword', thus showing snippets.

demo.mp4

Relevant configuration

sources = {
  providers = {
    snippets = {
      should_show_items = function(ctx) 
        if ctx.trigger.initial_kind == "trigger_character" 
           or ctx.trigger.initial_kind == "manual" 
        then
          return false
        end
        return true
      end
    }
  }
}

neovim version

v0.10.3

blink.cmp version: branch, tag, or commit

v0.8.2

@nowaylifer nowaylifer added the bug Something isn't working label Dec 27, 2024
@Saghen Saghen added the trigger Module which decides when to show windows label Dec 29, 2024
@Saghen Saghen closed this as completed in 3ef27bc Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working trigger Module which decides when to show windows
Projects
None yet
Development

No branches or pull requests

2 participants