1

I've recently been trying to set up Neovim as my full-time IDE. One plugin which would help my development process quite a bit is vim-iced, which I've been able to successfully install in Neovim using the Lazy Package Manager, my only issue is that I can't seem to figure out how to enable the default key mappings for vim-iced, I'm assuming I have to do this through lazy?

I've been looking through the Lazy.nvim documentation but I can't seem to find anything on setting keymaps other than:

The keys property can be a string or string[] for simple normal-mode mappings, or it can be a LazyKeys table...

Which is great if I want to set every individual keymap myself, and I have set two keys for Iced just to verify that the plugin is working correctly, but frankly, the idea of having to individually set every keymap for every plugin that I install, when most already have a well-thought-out keymap already, makes me ill.

svlasov
  • 9,923
  • 2
  • 38
  • 39
Dylar
  • 13
  • 2

1 Answers1

1

You need to take a look into 2.1.1 Installing plugins section, there's the following piece of code, which you'll need:

" Enable vim-iced's default key mapping
" This is recommended for newbies
let g:iced_enable_default_key_mappings = v:true

So all you need to do, is setting iced_enable_default_key_mappings to true. So you can do the following in your config, assuming you have declared the plugin in an extra file:

return {
    "liquidz/vim-iced",
    config = function()
        vim.g.iced_enable_default_key_mappings = true
    end,
}
TornaxO7
  • 1,150
  • 9
  • 24