You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return {
'comfysage/keymaps.nvim',
lazy=false,
priority=1000,
opts= {
-- default options given to `vim.keymap.set()`default_opts= {
silent=true,
noremap=true,
},
},
}
usage
first run:
require('keymaps').setup()
at the beggining of your config.
or using a protected call:
localok, keymaps=pcall(require, 'keymaps')
ifokthenkeymaps.setup() end
then you can use the 'keymaps' global like this:
-- keymaps <mode> [<key>] { <keymap> <description> }keymaps.normal['<space><TAB>'] = { ":$tabedit<CR>", 'Open New Tab' }
-- possible modes are: normal, visual and insert-- the keymap can also be a lua function, like this:keymaps.normal["<C-t>"] = {
function() require'telescope.builtin'.colorscheme() end,
'Find Colorscheme'
}
-- uses [@telescope](https://github.com/nvim-telescope/telescope.nvim)-- you can also pass additional options to the keymapskeymaps.normal["gg"] = { '<cmd>call smoothie#do("gg") <CR>', 'Scroll to top of file', { overwrite=true } }
keymaps.normal["G"] = { '<cmd>call smoothie#do("G") <CR>', 'Scroll to bottom of file', { overwrite=true } }
-- uses [@vim-smoothie](https://github.com/psliwka/vim-smoothie)-- keymaps can also be grouped by passing a name to the `group` property:keymaps.normal[',hp'] = { require'gitsigns'.preview_hunk, '[Git] Preview Hunk', group='Git' }
keymaps.normal[',hs'] = { require'gitsigns'.stage_hunk, '[Git] stage current hunk', group='Git' }
-- uses [@gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
Telescope Integration
Add the following to your nvim config to load the telescope extension