-- clear searchterm
vim.keymap.set('n', '<F5>', ':noh<CR>')

-- prevent using arrow keys or mouse
vim.keymap.set('n', '<Left>', ':echoe "Yo retard use h"<CR>')
vim.keymap.set('n', '<Right>', ':echoe "Yo retard use l"<CR>')
vim.keymap.set('n', '<Up>', ':echoe "Yo retard use k"<CR>')
vim.keymap.set('n', '<Down>', ':echoe "Yo retard use j"<CR>')
vim.opt.mouse = ''

-- dont automatically jump when searching
vim.keymap.set('n', '*', '*```<CR>')

-- show lsp floating tooltip
vim.keymap.set('n', '<c-k>', ':lua vim.lsp.buf.hover()<CR>')

-- The telescope leader key is space
-- keymaps can be found in telescope config
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- toggle tagbar plugin
vim.keymap.set('n', '<F8>', ':TagbarToggle fj<CR>')

-- tab navigation using <TAB>
vim.keymap.set('n', '<Tab>', ':tabnext<CR>')
vim.keymap.set('n', '<S-Tab>', ':tabprevious<CR>')
-- quick close tab
vim.keymap.set('n', '<C-w>', ':tabclose<CR>')

-- jump to definition in new tab
vim.keymap.set('n', '<C-]>', '<cmd>tab split | lua vim.lsp.buf.definition()<CR>', {})
