NvChad / NvChad

Blazing fast Neovim config providing solid defaults and a beautiful UI, enhancing your neovim experience.

Home Page:https://nvchad.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can't assign the toggle comment function to the gc command.

kamijodev opened this issue · comments

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

image

i guess you have to disable here

so in your custom plugins add that comment table ( not all of its options ), only keys and the mappings you need