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

Compatibility with which-key #7

Open
Thanatermesis opened this issue May 14, 2023 · 1 comment
Open

Compatibility with which-key #7

Thanatermesis opened this issue May 14, 2023 · 1 comment
Labels
awaiting response The author of the issue needs to provide more information

Comments

@Thanatermesis
Copy link

This plugin is really good! I like it, also, im searching for alternatives since all other options seems to have an impact in the performance 🤔

Unfortunately it doesn't seems compatible with which-key plugin, which is widely used, for example if you press ' you get the highlights, but it doesn't popup the whichkey plugin, any ideas?

@nullromo
Copy link
Collaborator

nullromo commented Feb 6, 2024

Unfortunately, this plugin and which-key (is this the right one?) both wait for a key to be pressed and take an action accordingly. This plugin uses getchar() and consumes the typed character. I couldn't quite figure out how which-key does it, but I think overall it's just not going to be compatible.

I tried adding a mapping like this:

vim.keymap.set(mode, '`', function()
    vim.notify('test')
    --require('mark-radar').scan(true)
    require('which-key').show('`')
end, { silent = true, noremap = true })

But unfortunately this results in some kind of loop that causes the 'test' notification to print out endlessly.

If a mapping similar to the one above can be used without causing an infinite loop, then there is a possibility of adding a callback option to this plugin where you can specify something like callback = function() require('which-key').show(...) end

So if you can provide a little more context for how to show the which-key panel correctly, then I can implement this fix.

@nullromo nullromo added the awaiting response The author of the issue needs to provide more information label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response The author of the issue needs to provide more information
Projects
None yet
Development

No branches or pull requests

2 participants