local map = vim.keymap.set local ufo = require("ufo") 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", "e", "NeoTreeFocus", { desc = "nvimtree focus window" }) map("n", "n", "set norelativenumber", { desc = "toggle line number" }) map("n", "rn", "set relativenumber", { desc = "toggle relative number" }) 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", "sn", "split", { desc = "Horizontal split" }) map("n", "sv", "vsplit", { desc = "Vertical split" }) 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", "", "DapContinue", { desc = "Start or continue debug" }) 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 = "Increase horizontal buffer" }) -- make the window bigger horizontally by pressing shift and = map("n", "=", "horizontal resize -2", { desc = "Decrease horizontal buffer" }) -- make the window smaller horizontally by pressing shift and - map('n', 'zR', ufo.openAllFolds) map('n', 'zM', ufo.closeAllFolds)