Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with lazy.nvim's default mappings #224

Open
smartinellimarco opened this issue May 6, 2024 · 3 comments
Open

Conflict with lazy.nvim's default mappings #224

smartinellimarco opened this issue May 6, 2024 · 3 comments

Comments

@smartinellimarco
Copy link

smartinellimarco commented May 6, 2024

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.

@ggandor
Copy link
Owner

ggandor commented May 15, 2024

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

@ggandor ggandor changed the title Conflict with Lazy.nvim Conflict with lazy.nvim's default mappings May 20, 2024
@ggandor ggandor changed the title Conflict with lazy.nvim's default mappings Conflict with LazyVim's default mappings May 20, 2024
@ggandor ggandor changed the title Conflict with LazyVim's default mappings Conflict with lazy.nvim's default mappings May 20, 2024
@ggandor
Copy link
Owner

ggandor commented May 20, 2024

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

Where is this documented? Thx.

@willhansen
Copy link

willhansen commented May 20, 2024

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,
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants