local map = vim.keymap.set map("n", ";", ":", { desc = "CMD enter command mode" }) map("i", "", "", { desc = "move left" }) map("i", "", "", { desc = "move right" }) map("i", "", "", { desc = "move down" }) map("i", "", "", { desc = "move up" }) map("n", "", "h", { desc = "switch window left" }) map("n", "", "l", { desc = "switch window right" }) map("n", "", "j", { desc = "switch window down" }) map("n", "", "k", { desc = "switch window up" }) map("n", "", "NeoTreeShowToggle", { desc = "nvimtree toggle window" }) map("n", "", "BufferLineMoveNext", { desc = "move buffer to right" }) map("n", "", "BufferLineMovePrev", { desc = "move buffer to left" }) map("n", "", "BufferLineCycleNext", { desc = "switch to next buffer" }) map("n", "", "BufferLineCyclePrev", { desc = "switch to prev buffer" }) lvim.builtin.which_key.mappings["ln"] = { "set norelativenumber", "Toggle line number" } lvim.builtin.which_key.mappings["e"] = { "NeoTreeFocus", "Nvimtree focus window" } lvim.builtin.which_key.mappings["rn"] = { "set relativenumber", "Toggle relative number" } lvim.builtin.which_key.mappings["ns"] = { "split", "Horizontal split" } lvim.builtin.which_key.mappings["vs"] = { "vsplit", "Vertical split" } map("n", "", "DapContinue") map("n", "", "DapToggleBreakpoint") map("n", "mk", "RustLsp moveItem up") map("n", "m,", "RustLsp moveItem down") map("n", "rs", "RustLsp run") map("n", "hh", "RustLsp hover actions") map("n", "ca", "RustLsp codeAction") map("n", "", "w!") map("i", "", "w!") map("n", "dr", " DapContinue ", { desc = "Continue debug" } ) map("n", "do", function() require("dapui").open() end, { desc = "Open DAP ui" }) map("n", "dc", function() require("dapui").close() end, { desc = "Start or continue debug" }) map("n", "dt", function() require("dapui").toggle() end, { desc = "Toggle DAP ui" }) map("n", "+", "vertical resize +5", { desc = "Increase vertical buffer" }) -- make the window biger vertically map("n", "-", "vertical resize -5", { desc = "Decrease vertical buffer" }) -- make the window smaller vertically map("n", "=", "horizontal resize -2", { desc = "Decrease horizontal buffer" }) -- make the window smaller horizontally by pressing shift and - map("n", "_", "horizontal resize +2", { desc = "Increase horizontal buffer" }) -- make the window bigger horizontally by pressing shift and = map("n", "", "foldopen") map("n", "", "foldclose")