diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index da7a3f1..b120b9d 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua @@ -1,31 +1,25 @@ require "nvchad.mappings" --- add yours here - local map = vim.keymap.set --- map("n", ";", ":", { desc = "cmd enter command mode" }) - map("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" }) -map("n", "gD", "Telescope lsp_definitions", { desc = "Go to Definitions" }) -map("n", "grr", "Telescope lsp_references", { desc = "Go to references" }) -map("n", "dh", ":lua vim.diagnostic.open_float()", { desc = "Show diagnostics" }) -map("n", "dj", ":lua vim.diagnostic.goto_next()", { desc = "Go to next" }) -map("n", "dk", ":lua vim.diagnostic.goto_prev()", { desc = "Go to previous" }) -map("n", "da", ":lua vim.lsp.buf.code_action()", { desc = "Code actions", noremap = true, silent = true }) +map("n", "gD", ":Telescope lsp_definitions", { desc = "Go to Definitions" }) +map("n", "grr", ":Telescope lsp_references", { desc = "Go to References" }) +map("n", "gl", ":lua vim.lsp.buf.code_action()", { noremap = true, silent = true }) +map("n", "dh", ":lua vim.diagnostic.open_float()", { desc = "Show diagnostics" }) +map("n", "dj", ":lua vim.diagnostic.goto_next()", { desc = "Go to next" }) +map("n", "dk", ":lua vim.diagnostic.goto_prev()", { desc = "Go to previous" }) +map("n", "da", ":lua vim.lsp.buf.code_action()", { desc = "Code actions", noremap = true, silent = true }) -- Telescope -map("n", "fr", "Telescope resume", { desc = "Resume last search" }) -map("n", "fs", "Telescope grep_string", { desc = "Find selected string" }) -map("n", "fk", "Telescope keymaps", { desc = "Find keymaps" }) -map("n", "fd", "Telescope diagnostics", { desc = "Diagnostics" }) -map("n", "x", '"_x', { desc = "Delete char without yanking" }) -map("n", "c", '"_c', { desc = "Change without yanking" }) - -map({ "n", "v" }, "ge", "CodeCompanion", { desc = "CodeCompanion" }) -map({ "n", "v" }, "ga", "CodeCompanionActions", { desc = "CodeCompanion actions" }) -map("n", "gc", "CodeCompanionChat Toggle", { desc = "CodeCompanion chat" }) -map("v", "gc", "CodeCompanionChat Add", { desc = "Send selection to CodeCompanion chat" }) - --- P paste with --- global marks --- "{register} +map("n", "fr", ":Telescope resume", { desc = "Resume last search" }) +map("n", "fs", ":Telescope grep_string", { desc = "Find selected string" }) +map("n", "fk", ":Telescope keymaps", { desc = "Find keymaps" }) +map("n", "fd", ":Telescope diagnostics", { desc = "Diagnostics" }) +-- CodeCompanion +map({ "n", "v" }, "ge", ":CodeCompanion", { desc = "CodeCompanion" }) +map({ "n", "v" }, "ga", ":CodeCompanionActions", { desc = "CodeCompanion actions" }) +map("n", "gc", ":CodeCompanionChat Toggle", { desc = "CodeCompanion chat" }) +map("v", "gc", ":CodeCompanionChat Add", { desc = "Send selection to CodeCompanion chat" }) +-- Remaps +map({ "n", "v" }, "x", '"_x', { desc = "Delete char without yanking" }) +map({ "n", "v" }, "c", '"_c', { desc = "Change without yanking" })