diff --git a/config/nvim/lua/mappings.lua b/config/nvim/lua/mappings.lua index b61191c..3b00e56 100644 --- a/config/nvim/lua/mappings.lua +++ b/config/nvim/lua/mappings.lua @@ -3,18 +3,45 @@ require "nvchad.mappings" -- add yours here local map = vim.keymap.set +local nomap = vim.keymap.del -map("i", "jk", "") -map("i", "", "I" ) -map("i", "", "A" ) +nomap("n", "b") +nomap("n", "ch") +nomap("n", "cm") +nomap("n", "ds") +nomap("n", "fh") +nomap("n", "fm") +nomap("n", "gt") +nomap("n", "ma") +nomap("n", "pt") +nomap("n", "rn") +nomap("n", "th") +nomap("n", "v") +nomap("n", "wK") +nomap("n", "wk") +nomap("n", "x") +nomap("n", "fo") +nomap("n", "fz") -map("n", ";", ":", { desc = "CMD enter command mode" }) -map("n", "", "wq!", { desc = "Save and Exit" }) -map("n", "m", 'execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")', { desc = "Toggle Column" }) -map("n", "h", "set hlsearch!", { desc = "Toggle hlsearch" }) -map("n", "j", "bprevious", { desc = "Buffer Previous" }) -map("n", "k", "bnext", { desc = "Buffer Next" }) -map("n", "n", 'set number!IBLToggleexecute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")', { desc = "Toggle Decorations" }) -map("n", "w", "lua require('whitespace-nvim').trim()", { desc = "Trim Trailing Whitespaces" }) -map("n", "x", "bd", { desc = "Buffer Close" }) -map("n", "", "w", { desc = "Switch buffer" }) +map("i", "", "I") +map("i", "", "A") + +map("n", "", "wq!", { desc = "save and exit" }) +map("n", "b", "", { desc = "buffer operations" }) +map("n", "bn", "enew", { desc = "new" }) +map("n", "bj", "bprevious", { desc = "previous" }) +map("n", "bk", "bnext", { desc = "next" }) +map("n", "bx", "bd", { desc = "close" }) +map("n", "e", "NvimTreeFocus", { desc = "file tree" }) +map("n", "f", "", { desc = "find operations" }) +map("n", "fa", "Telescope find_files follow=true no_ignore=true hidden=true", { desc = "all files" }) +map("n", "fb", "Telescope buffers", { desc = "buffers" }) +map("n", "ff", "Telescope find_files", { desc = "files" }) +map("n", "fw", "Telescope live_grep", { desc = "grep" }) +map("n", "h", "set hlsearch!", { desc = "Toggle hlsearch" }) +map("n", "m", 'execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")', { desc = "Toggle Column" }) +map("n", "n", 'set number!IBLToggleexecute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")', { desc = "Toggle Decorations" }) +map("n", "t", function() + require("nvchad.themes").open() +end, { desc = "Change Theme" }) +map("n", "", "w", { desc = "switch pane" })