1
0
Fork 1
Dotfiles_nvim/lua/core/keymap.lua
2024-09-08 01:50:39 +02:00

81 lines
1.5 KiB
Lua

local K = {}
--[[ Leader ]]
vim.g.mapleader = ' '
--[[ Indentation ]]
vim.keymap.set('n', '<Tab>', '>>')
vim.keymap.set('n', '<S-Tab>', '<<')
--[[ Markdown ]]
K.MARKDOWN_PREVIEW = {
mode = 'n',
shortcut = '<Leader>mp',
description = 'Show Markdown Preview'
}
--[[ Git ]]
K.GIT = {
OPEN = {
mode = 'n',
shortcut = '<Leader>go',
description = 'Open Git'
},
HUNK = {
mode = 'n',
shortcut = '<Leader>gh',
description = 'Toggle Inline Git Diff'
},
BLAME = {
mode = 'n',
shortcut = '<Leader>gb',
description = 'Toggle Inline Git Blame'
}
}
--[[ Terminal ]]
K.TOGGLE_TERMINAL = {
mode = { 'n', 't' },
shortcut = '<F6>',
description = 'Toggle Terminal'
}
--[[ Snippets ]]
K.SNIPPETS = {
ACCEPT_OR_JUMP = {
mode = { 'i', 's' },
shortcut = '<Tab>',
},
JUMP_BACKWARDS = {
mode = { 'i', 's' },
shortcut = '<S-Tab>',
}
}
--[[ Search ]]
K.SEARCH = {
FIND_FILE = {
mode = 'n',
shortcut = '<leader>ff',
description = 'Find File'
},
FUZZY_FIND = {
mode = 'n',
shortcut = '<leader>fz',
description = 'Fuzzy File'
},
GLOBAL_FIND_FILE = {
mode = 'n',
shortcut = '<leader>gff',
description = 'Global Find File'
},
GLOBAL_FUZZY_FIND = {
mode = 'n',
shortcut = '<leader>gfz',
description = 'Global Fuzzy File'
},
}
--TODO: Port the rest of the Keybindings to here
return K