local M = {} local map = vim.keymap.set function M.setup() map("n", "", "zz", { desc = "Scroll up and center" }) map("n", "n", "nzzzv", { desc = "Next search result and center" }) map("n", "N", "Nzzzv", { desc = "Previous search result and center" }) map("x", "pp", '"_dP', { desc = "Paste without yanking" }) map("v", "<", "", ">gv", { desc = "Reselect after indent" }) map("v", "J", ":m '>+1gv=gv", { desc = "Move line down" }) map("v", "K", ":m '<-2gv=gv", { desc = "Move line up" }) map("n", "", "bnext", { desc = "Next buffer" }) map("n", "", "bprevious", { desc = "Previous buffer" }) map("n", "bk", "bdelete", { desc = "Delete buffer" }) map("n", "bn", "bnext", { desc = "Next buffer" }) map("n", "bp", "bprevious", { desc = "Previous buffer" }) map("n", "x", "!chmod +x %", { desc = "Make file executable" }) map({ "n", "v" }, "y", '"+y', { desc = "Yank to system clipboard" }) map("n", "sc", "nohlsearch", { desc = "Clear search highlights" }) map({ "n", "v" }, "m", require("utils.functions.mkdir_under_cursor").mkdir_under_cursor, { desc = "Create directory from text", }) map("n", "pg", require("utils.functions.git_paste").git_paste_prompt, { desc = "Paste content from Git raw URL", }) map("n", "wa", vim.lsp.buf.add_workspace_folder, { desc = "Add workspace folder" }) map("n", "wr", vim.lsp.buf.remove_workspace_folder, { desc = "Remove workspace folder" }) map("n", "wl", function() vim.print(vim.lsp.buf.list_workspace_folders()) end, { desc = "List workspace folders" }) end return M