Skip to content

fix(*) incopatibility with blink-cmp as well as nvim-cmp #354 #382

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 4 commits into
base: master
Choose a base branch
from

Conversation

Ajaymamtora
Copy link

Fixes #354

@andymass
Copy link
Owner

Thanks for contributing. Is this ready or WIP?

@Slotos
Copy link

Slotos commented Apr 8, 2025

This solution looks categorically wrong. vim-matchup has nothing to do with nvim-cmp nor blink.cmp. The problem of "pretend pop-up menu is open" is also not specific to those specific completion plugins.

A "good neighbor" approach here would be for vim-matchup to allow setting a ppumvisible() handler, that users can use to deal with whatever tooling they are employing at the moment. A few examples for specific plugins can be provided in the wiki.

vim-matchup should not fix design choices of other plugins, however reasonable those choices are.

@Ajaymamtora
Copy link
Author

This solution looks categorically wrong. vim-matchup has nothing to do with nvim-cmp nor blink.cmp. The problem of "pretend pop-up menu is open" is also not specific to those specific completion plugins.

A "good neighbor" approach here would be for vim-matchup to allow setting a ppumvisible() handler, that users can use to deal with whatever tooling they are employing at the moment. A few examples for specific plugins can be provided in the wiki.

vim-matchup should not fix design choices of other plugins, however reasonable those choices are.

There was already something in the codebase that handled nvim-cmp - I extended it to support blink.cmp.

@Ajaymamtora
Copy link
Author

Ajaymamtora commented Apr 27, 2025

Thanks for contributing. Is this ready or WIP?

This is kind of a WIP but I think I've got a workaround without this PR:

    local cmp_list = require("blink.cmp.completion.list")

    -- Handler for show event
    cmp_list.show_emitter:on(function()
      vim.g.matchup_enabled = false
    end)

    -- Handler for hide event
    cmp_list.hide_emitter:on(function()
      vim.g.matchup_enabled = false
    end)

So going to test it a bit more and might end up abandoning

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.

[Bug] Sniprun + matchup cause snippets to automatically be expanded in nvim-cmp
4 participants