-
Notifications
You must be signed in to change notification settings - Fork 5
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
Does not work with which-key.nvim #20
Comments
Hey! |
I think it's more of a limitation on the which-key side. As which-key comes with presets for default vim keys, it considers that there is a conflict. When running
It seems legit but I've tried to disable local which_key = require("which-key")
which_key.setup({
plugins = {
presets = {
operators = false,
motions = false,
},
},
}) Or like this : local which_key = require("which-key")
local presets = require("which-key.plugins.presets")
presets.operators["d"] = nil
which_key.setup({}) but it does not works.... Maybe @folke can help us on that ? |
Related to this, for me cutlass doesn't work at all if the |
@gbprod I think I fixed it by adding {
"folke/which-key.nvim",
opts = function(_, opts)
opts.triggers_blacklist = {
-- list of mode / prefixes that should never be hooked by WhichKey
-- this is mostly relevant for keymaps that start with a native binding
i = { "j", "k", "d", "D", "s", "S" },
v = { "j", "k", "d", "D", "s", "S" },
n = { "d", "D", "s", "S" },
}
return opts
end,
}, to It would be nice if cutlass could be made |
Assuming we use |
I've just tried that but it doesn't works for me. I have which-key menu that appear, but cutlass mappings are not set :/ Maybe you have a more complete config to share @b0ae989c ? |
@gbprod Here is a minimal local root = vim.fn.fnamemodify('./.repro', ':p')
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end
local lazypath = root .. '/plugins/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
local plugins = {
'folke/tokyonight.nvim',
{
'folke/which-key.nvim',
event = 'VeryLazy',
},
{
'gbprod/cutlass.nvim',
lazy = false,
config = true,
},
}
require('lazy').setup(plugins, { root = root .. '/plugins' })
vim.cmd.colorscheme('tokyonight') |
@b0ae989c It works, but which-key can't show the menu in visual mode. |
That's a separate issue. With the config above, |
I do not know why, but the plugin actually remaps Lines 74 to 76 in 708864f
Add |
I am sorry, it seems I misunderstood something... Mini.operator has the same symptoms. |
This appears to be fixed with the latest version of |
When using cutlass with which-key, the remapped keys prevent which-key from opening the popup.
The text was updated successfully, but these errors were encountered: