2022-11-02 09:05:01 +00:00
|
|
|
local function map(mode, shortcut, command)
|
2022-11-02 13:40:30 +00:00
|
|
|
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
|
2022-11-01 15:15:15 +00:00
|
|
|
end
|
|
|
|
|
2022-11-02 09:05:01 +00:00
|
|
|
local function nmap(shortcut, command)
|
2022-11-02 13:40:30 +00:00
|
|
|
map('n', shortcut, command)
|
2022-11-01 15:15:15 +00:00
|
|
|
end
|
|
|
|
|
2022-11-07 16:41:35 +00:00
|
|
|
vim.g.mapleader = ' '
|
2023-02-08 23:54:40 +00:00
|
|
|
-- Aerial
|
2023-01-31 09:06:01 +00:00
|
|
|
nmap('<leader>aa', '<cmd>AerialToggle<cr>')
|
2022-11-01 15:15:15 +00:00
|
|
|
|
|
|
|
-- Telescope
|
|
|
|
nmap('<leader>;', '<cmd>Telescope builtin<cr>')
|
|
|
|
nmap('<leader>ff', '<cmd>Telescope find_files<cr>')
|
2023-02-08 23:54:40 +00:00
|
|
|
nmap('<leader>fg', '<cmd>Telescope live_grep<cr>')
|
2023-01-26 17:10:57 +00:00
|
|
|
nmap('<leader>fp', '<cmd>Telescope projects<cr>')
|
2023-01-25 18:36:39 +00:00
|
|
|
nmap('<leader>fa', '<cmd>Telescope aerial<cr>')
|
2023-01-31 09:06:01 +00:00
|
|
|
nmap('<leader>fl', '<cmd>Telescope lsp_document_symbols<cr>')
|
2022-11-01 15:15:15 +00:00
|
|
|
nmap('<leader>fe', '<cmd>Telescope diagnostics<cr>')
|
2023-01-31 09:06:01 +00:00
|
|
|
nmap('<leader>fs', '<cmd>Telescope treesitter<cr>')
|
2022-11-01 15:15:15 +00:00
|
|
|
nmap('<leader>fz', '<cmd>Telescope current_buffer_fuzzy_find<cr>')
|
|
|
|
|
|
|
|
-- Nvim-tree
|
2023-01-25 18:36:39 +00:00
|
|
|
nmap('<leader>n', '<cmd>NvimTreeToggle<cr>')
|
2022-11-01 17:23:08 +00:00
|
|
|
|
|
|
|
-- Trouble
|
2022-11-15 13:33:09 +00:00
|
|
|
nmap('<leader>xx', '<cmd>TroubleToggle<cr>')
|
|
|
|
nmap('<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>')
|
|
|
|
nmap('<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>')
|
|
|
|
nmap('<leader>xq', '<cmd>TroubleToggle quickfix<cr>')
|
|
|
|
nmap('<leader>xl', '<cmd>TroubleToggle loclist<cr>')
|
2023-02-08 23:54:40 +00:00
|
|
|
|
|
|
|
-- Navigator
|
|
|
|
vim.keymap.set({'n', 't'}, '<A-h>', '<CMD>NavigatorLeft<CR>')
|
|
|
|
vim.keymap.set({'n', 't'}, '<A-l>', '<CMD>NavigatorRight<CR>')
|
|
|
|
vim.keymap.set({'n', 't'}, '<A-k>', '<CMD>NavigatorUp<CR>')
|
|
|
|
vim.keymap.set({'n', 't'}, '<A-j>', '<CMD>NavigatorDown<CR>')
|
|
|
|
vim.keymap.set({'n', 't'}, '<A-p>', '<CMD>NavigatorPrevious<CR>')
|