Skip to content

where to put keymappings if using lazy.nvim #135

Answered by mrjones2014
svenXY asked this question in Q&A
Discussion options

You must be logged in to vote

So, if you define them that way, it will try to require the plugin before the plugin has been loaded, since this is what is telling lazy.nvim how to load the plugin.

The easiest thing would be to just wrap the keymaps in a function like:

keys = {
  {'n', '<A-h>', function() require('smart-splits').resize_left() end, desc='Resize left'},
}

If you happen to be a legendary.nvim user as well, there's also a built-in extension for smart-splits.nvim as well.

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
3 replies
@svenXY
Comment options

@svenXY
Comment options

@mrjones2014
Comment options

Answer selected by mrjones2014
Comment options

You must be logged in to vote
8 replies
@KadoBOT
Comment options

@mrjones2014
Comment options

@KadoBOT
Comment options

@mrjones2014
Comment options

@KadoBOT
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants