local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } -- Getting stuck in ~~vim~~ terminal map("t", "", "", {}) -- Quick cursor movement map("n", "", "5j", opts) map("n", "", "5k", opts) -- Quick pasting/yoinking to system register map("n", "+y", '"+y', opts) map("n", "+p", '"+p', opts) map("n", "+d", '"+d', opts) map("n", "*y", '"*y', opts) map("n", "*p", '"*p', opts) map("n", "*d", '"*d', opts) -- Vimgrep map("n", "", ":cnext", opts) map("n", "", ":cprevious", opts) -- See `:help vim.lsp.*` for documentation on any of the below functions map("n", "gd", "lua vim.lsp.buf.definition()", opts) map("n", "K", "lua vim.lsp.buf.hover()", opts) map("n", "", "lua vim.lsp.buf.signature_help()", opts) map("n", "-n", "lua vim.lsp.buf.rename()", opts) map("n", "-a", "lua vim.lsp.buf.code_action()", opts) map("n", "gr", "lua vim.lsp.buf.references()", opts) map("n", "e", "lua vim.diagnostic.open_float()", opts) map("n", "-d", "lua vim.diagnostic.goto_next()", opts) map("n", "-r", "lua vim.lsp.buf.format { asnyc = true }", opts)