local map = vim.api.nvim_set_keymap -- Set space as leader map('n', ' ', '', {noremap = true}) vim.g.mapleader = ' ' -- Clear highlights with map('n', ' ', ':noh', {noremap = true}) -- Splits map('n', 's', 's', {noremap = true}) map('n', 'v', 'v', {noremap = true}) -- Previous and next tab map('n', '[', ':tabp', {noremap = true}) map('n', ']', ':tabn', {noremap = true}) -- New tab map('n', 't', ':tabnew', {noremap = true}) -- File finder map('n', 'ff', 'Telescope find_files', {noremap = true}) map('n', 'fg', 'Telescope live_grep', {noremap = true}) map('n', 'fb', 'Telescope buffers', {noremap = true}) map('n', 'fh', 'Telescope help_tags', {noremap = true}) -- LSP map('n', 'gd', 'lua vim.lsp.buf.definition()', {noremap = true, silent = true}) map('n', 'gD', 'lua vim.lsp.buf.declaration()', {noremap = true, silent = true}) map('n', 'gr', 'lua vim.lsp.buf.references()', {noremap = true, silent = true}) map('n', 'gi', 'lua vim.lsp.buf.implementation()', {noremap = true, silent = true}) map('n', '', 'lua vim.lsp.buf.hover()', {noremap = true, silent = true}) map('n', '', 'lua vim.lsp.buf.signature_help()', {noremap = true, silent = true}) map('n', '[g', 'lua vim.lsp.diagnostic.goto_prev()', {noremap = true, silent = true}) map('n', ']g', 'lua vim.lsp.diagnostic.goto_next()', {noremap = true, silent = true})