I can't assign the toggle comment function to the gc command.
kamijodev opened this issue · comments
Kenta Kamijo commented
Describe the bug
Hello! I recently started using nvchad as a beginner.
I want to execute comment toggling with gc, but it behaves strangely. Sometimes which-key.nvim appears.
Is this a bug, or is there something wrong with my settings?
It might be similar to #1972
To Reproduce
nomap("n", "gc")
nomap("n", "gcc")
vim.keymap.set('n', 'gc',
function()
require("Comment.api").toggle.linewise.current()
end, { desc = "Comment Toggle" }
)
Desktop (please complete the following information):
- Operating System: Endeavour OS
- Terminal: Alacritty
- Version of Neovim: v0.10.0
Sidhanth Rathod commented
Sidhanth Rathod commented
so in your custom plugins add that comment table ( not all of its options ), only keys and the mappings you need