leap.nvim icon indicating copy to clipboard operation
leap.nvim copied to clipboard

Conflict with lazy.nvim's default mappings

Open smartinellimarco opened this issue 1 year ago • 3 comments

After creating and saving a new plugin spec in Lazy, Neovim will automatically open and install the plugin upon reopening. However, there's a conflict with the 'S' key, which Lazy uses for the 'Sync' operation, causing Leap to report a keymap conflict.

smartinellimarco avatar May 06 '24 01:05 smartinellimarco

Define the mappings manually then, instead of calling create_default_mappings, which does this check (see :help leap-custom-mappings).

ggandor avatar May 15 '24 14:05 ggandor

there's a conflict with the 'S' key, which Lazy uses for the 'Sync' operation

Where is this documented? Thx.

ggandor avatar May 20 '24 13:05 ggandor

there's a conflict with the 'S' key, which Lazy uses for the 'Sync' operation

Where is this documented? Thx.

Can't find on the Lazy github, but it shows up in the in-vim menu: image

Edit: Here's the workaround I'm using that the first reply suggests:

  {"ggandor/leap.nvim",
    lazy = false,
    config = function() 
      -- require('leap').create_default_mappings()
      vim.keymap.set({'n', 'x', 'o'}, 's',  '<Plug>(leap-forward)')
      vim.keymap.set({'n', 'x', 'o'}, 'S',  '<Plug>(leap-backward)')
      vim.keymap.set({'n', 'x', 'o'}, 'gs', '<Plug>(leap-from-window)')
    end,
  },

willhansen avatar May 20 '24 14:05 willhansen