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

fix: Outdated completion item with mini.snippets #1035

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abeldekat
Copy link
Contributor

Hello @Saghen,

I recently fixed this issue in nvim-cmp.

The problem also occurs in blink, and the fix is very similar.

Are there any drawbacks to the following approach?

.../completion/init.lua:

  -- trigger -> sources: request completion items from the sources on show
  trigger.show_emitter:on(function(event)
    vim.schedule(function()
      -- schedule to avoid outdated completion items
      sources.request_completions(event.context)
    end)
  end)

@Saghen
Copy link
Owner

Saghen commented Jan 20, 2025

This would add latency to all of the sources. We want to get the request out to the LSP ASAP. I'll read up on that issue you linked soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants