local map = vim.keymap.set local builtin = require('telescope.builtin') map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", "sw", " set wrap! ", {desc = "Toggle text wrapping"}) map("n", "fm", function() require("conform").format() end, {desc = "Format with conform"}) map("n", "-", " Oil ", {desc = "Open directory in oil"}) map("n", "rcu", function() require('crates').upgrade_all_crates() end, {desc = "Upgrade rust crates"}) map("n", "ca", function() vim.lsp.buf.code_action() end, {desc = "Lsp code action"}) map("n", "gr", function() vim.lsp.buf.references() end, {desc = "Lsp references"}) map("n", "ra", function() vim.lsp.buf.rename() end, {desc = "Lsp rename symbol"}) map("n", "gm", "Telescope git_commits", { desc = "telescope git commits" }) map('n', 'fi', function() builtin.live_grep({ prompt_title = "Files matching TODO", default_text = "(TODO|todo|FIXME|THOUGHT|REFACTOR|TEST)", }) end, {desc = "find comments using telescope"}) -- stay in v mode after indenting map("v", "<", "", ">gv") -- remove the fuckass escape to normal mode bind that nvchad includes for some reason vim.keymap.del("i", "jk")