Closed max397574 closed 1 year ago
yes and yes
You didn't add <leader>cc
to the keys
handler. Adding that one makes it work
reopening the issue
<leader>cj
@folke
What do you mean?
<leader>cj
doesn't work
which is also not in that keys
handler?
yes it isn't
because it's an operator pending mapping
and I can't put all the different text objects and motions into the keys
handler
I get what you mean with that leader cj now. leader c is an operator pending mode. Keys currently only supports normal mode, so the retrigger will not to what you want.
weird thing I just discovered
if I press <leader>c
, wait a lil bit and then j
it works
I'm planning on expanding the keys handler soon.
That works, because that will load the comments plugin. Your then inside whichkey and pressing c again, wich-key will redo the whole mapping, so that works
I'll wait for that expansion then and until then try to hack something together with init
I think I was able to fix it anyway. At least it also works now for <leader>cj
works perfectly now thank you very much for the quick fix
Describe the bug I need to press
<space>cc
twice to actually make it work the first time it isn't mappedWhich version of Neovim are you using? NVIM v0.9.0-dev-525+ga7332ba9b
To Reproduce
Steps to reproduce the behavior:
<space>cc
<space>cc
Expected Behavior line gets commented out on 2.
Log Please include any related errors from the Noice log file. (open with
:Lazy log
)Lazy log
repro.lua
```lua 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 vim.g.mapleader = " " -- bootstrap lazy local lazypath = root .. "/plugins/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "--single-branch", "https://github.com/folke/lazy.nvim.git", lazypath, }) end vim.opt.runtimepath:prepend(lazypath) -- install plugins local plugins = { "folke/tokyonight.nvim", { "folke/which-key.nvim", config = function() require("which-key").register({ c = { name = "ο» Comment", c = { "Toggle Line" }, }, }, { prefix = "two other things:
root
in repro. because people don't expect the plugins to be cloned into their current directory (at least I didn't)