1
0
Fork 1
Dotfiles_nvim/lua/core/keymap.lua

172 lines
3.4 KiB
Lua
Raw Normal View History

2024-09-07 23:50:39 +00:00
local K = {}
--[[ Leader ]]
2024-07-02 21:52:43 +00:00
vim.g.mapleader = ' '
--[[ Indentation ]]
vim.keymap.set('n', '<Tab>', '>>')
vim.keymap.set('n', '<S-Tab>', '<<')
2024-09-07 23:50:39 +00:00
2024-11-23 16:55:23 +00:00
--[[ Focus Shade ]]
K.FOCUS_SHADE = {
UP = {
shortcut = '<C-Up>',
},
DOWN = {
shortcut = '<C-Down>',
},
2024-09-07 23:50:39 +00:00
}
--[[ Git ]]
K.GIT = {
OPEN = {
mode = 'n',
shortcut = '<Leader>go',
2024-11-23 16:55:23 +00:00
description = 'Open Git',
2024-09-07 23:50:39 +00:00
},
HUNK = {
mode = 'n',
shortcut = '<Leader>gh',
2024-11-23 16:55:23 +00:00
description = 'Toggle Inline Git Diff',
2024-09-07 23:50:39 +00:00
},
BLAME = {
mode = 'n',
shortcut = '<Leader>gb',
2024-11-23 16:55:23 +00:00
description = 'Toggle Inline Git Blame',
},
2024-09-07 23:50:39 +00:00
}
--[[ Terminal ]]
K.TOGGLE_TERMINAL = {
2024-11-23 16:55:23 +00:00
mode = { 'n', 't' },
shortcut = '<F6>',
description = 'Toggle Terminal',
}
--[[ Ollam ]]
K.OLLAMA = {
mode = 'n',
shortcut = '<leader>op',
description = 'Ollama Prompt',
2024-09-07 23:50:39 +00:00
}
--[[ Snippets ]]
K.SNIPPETS = {
ACCEPT_OR_JUMP = {
mode = { 'i', 's' },
shortcut = '<Tab>',
},
JUMP_BACKWARDS = {
mode = { 'i', 's' },
shortcut = '<S-Tab>',
2024-11-23 16:55:23 +00:00
},
2024-09-07 23:50:39 +00:00
}
--[[ Search ]]
K.SEARCH = {
FIND_FILE = {
mode = 'n',
shortcut = '<leader>ff',
2024-11-23 16:55:23 +00:00
description = 'Find File',
2024-09-07 23:50:39 +00:00
},
FUZZY_FIND = {
mode = 'n',
shortcut = '<leader>fz',
2024-11-23 16:55:23 +00:00
description = 'Fuzzy File',
2024-09-07 23:50:39 +00:00
},
GLOBAL_FIND_FILE = {
mode = 'n',
shortcut = '<leader>gff',
2024-11-23 16:55:23 +00:00
description = 'Global Find File',
2024-09-07 23:50:39 +00:00
},
GLOBAL_FUZZY_FIND = {
mode = 'n',
shortcut = '<leader>gfz',
2024-11-23 16:55:23 +00:00
description = 'Global Fuzzy File',
2024-09-07 23:50:39 +00:00
},
}
2024-11-23 16:55:23 +00:00
--[[ Debugging ]]
K.DEBUGGING = {
TOGGLE_UI = {
mode = 'n',
shortcut = '<Leader>dt',
description = 'Toggle Debugger UI',
},
TOGGLE_BREAKPOINT = {
mode = 'n',
shortcut = '<Leader>db',
description = 'Toggle Breakpoint',
},
CONTINUE = {
mode = 'n',
shortcut = '<Leader>dc',
description = 'Debugger Continue',
},
TERMINATE = {
mode = 'n',
shortcut = '<Leader>dx',
description = 'Debugger Terminate',
},
STEP_OVER = {
mode = 'n',
shortcut = '<Leader>ds',
description = 'Debugger Step Over',
},
}
--[[ File Tree ]]
K.FILE_TREE = {
TOGGLE = {
mode = 'n',
shortcut = '<Leader>ft',
description = 'Toggle File Tree',
},
SHOW_OPEN = {
mode = 'n',
shortcut = '<Leader>fo',
description = 'Show Open Files',
},
}
--[[ CODE ]]
K.CODE = {
SHOW_DEFINITION = {
mode = 'n',
shortcut = '<Leader>cd',
description = 'Show Code Definition',
},
GOTO_DEFINITION = {
mode = 'n',
shortcut = '<Leader>cgd',
description = 'Go to Definition',
},
PEEK_DEFINITION = {
mode = 'n',
shortcut = '<Leader>cpd',
description = 'Peek Code Definition',
},
GOTO_REFERENCES = {
mode = 'n',
shortcut = '<Leader>cgr',
description = 'Go to References',
},
ACTIONS = {
mode = 'n',
shortcut = '<Leader>ca',
description = 'Do Code Actions',
},
FORMAT = {
mode = 'n',
shortcut = '<Leader>cf',
description = 'Format Code',
},
RENAME = {
mode = 'n',
shortcut = '<Leader>cr',
description = 'Rename Variable',
},
}
2024-09-07 23:50:39 +00:00
return K