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

bug: does not work with cutlass.nvim #513

Closed
3 tasks done
kevintraver opened this issue Sep 9, 2023 · 4 comments
Closed
3 tasks done

bug: does not work with cutlass.nvim #513

kevintraver opened this issue Sep 9, 2023 · 4 comments
Labels
bug Something isn't working stale

Comments

@kevintraver
Copy link

Did you check docs and existing issues?

  • I have read all the which-key.nvim docs
  • I have searched the existing issues of which-key.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.1

Operating system/version

MacOS 13

Describe the bug

Does not work with cutlass.nvim

gbprod/cutlass.nvim#20

Steps To Reproduce

Install which-key.

Then pressing any pending operator mode keys should bring up which-key:

c, C, s, S, d, D, x, X, y

Expected Behavior

The which-key panel does not show up.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
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)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "gbprod/cutlass.nvim",
    config = function()
      require("cutlass").setup()
    end,
  },
  { "folke/which-key.nvim", config = true },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@sebastianst
Copy link

Related to this, for me cutlass doesn't work at all if the which-key plugin is also enabled. The pop-ups of which-key show up, but the d and s bindings are just not set by cutlass. Seems like an ordering issue to me.

@sebastianst
Copy link

I think I found a workaround by setting the triggers_blacklist option of which-key to something like

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", " ", "g" },
            n = { "d", "D", "s", "S", "m" },
        }

@gbprod
Copy link

gbprod commented Oct 19, 2023

I've tried many things to fix this but nothing works 😓

Copy link
Contributor

github-actions bot commented Jul 6, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jul 6, 2024
@folke folke closed this as completed Jul 12, 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 stale
Projects
None yet
Development

No branches or pull requests

4 participants