---@type MappingsTable local M = {} M.disabled = { n = { ["h"] = "", ["ff"] = "", [""] = "", [""] = "", }, } M.lazygit = { plugin = true, n = { ["gg"] = { " LazyGit ", "Open LazyGit" }, }, } M.clipboard = { plugin = false, n = { ["y"] = { '"+y', "yank to system" }, ["Y"] = { '"+Y', "yank to system" }, ["yy"] = { '"+y', "yank to system" }, }, v = { ["y"] = { '"+y', "yank to system" }, ["Y"] = { '"+Y', "yank to system" }, ["yy"] = { '"+y', "yank to system" }, }, } M.telescope = { plugin = true, n = { -- find ["ff"] = { " Telescope find_files ", "Find files" }, ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "Find all" }, ["fw"] = { " Telescope live_grep ", "Live grep" }, ["fb"] = { " Telescope buffers ", "Find buffers" }, ["fh"] = { " Telescope help_tags ", "Help page" }, ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, -- git ["cm"] = { " Telescope git_commits ", "Git commits" }, ["gt"] = { " Telescope git_status ", "Git status" }, -- pick a hidden term ["pt"] = { " Telescope terms ", "Pick hidden term" }, -- theme switcher ["th"] = { " Telescope themes ", "Nvchad themes" }, ["ma"] = { " Telescope marks ", "telescope bookmarks" }, }, } M.nvimtree = { plugin = true, n = { -- toggle [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, -- focus ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, }, } M.movements = { plugin = false, i = { --big move [""] = { "", "big step down" }, [""] = { "", "big step down" }, -- go to beginning and end [""] = { "", "Beginning of line" }, [""] = { "", "End of line" }, -- navigate within insert mode [""] = { "", "Move left" }, [""] = { "", "Move right" }, [""] = { "", "Move down" }, [""] = { "", "Move up" }, }, n = { --big move [""] = { "", "big step down" }, [""] = { "", "big step down" }, -- go to beginning and end ["H"] = { "", "Beginning of line" }, ["L"] = { "", "End of line" }, }, v = { --big move [""] = { "", "big step down" }, [""] = { "", "big step down" }, -- go to beginning and end ["H"] = { "", "Beginning of line" }, ["L"] = { "", "End of line" }, }, t = { [""] = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode", }, }, } M.edit = { plugin = false, n = { -- easy newline ["OO"] = { "O", "insert a line above", opts = { nowait = false } }, ["oo"] = { "o", "insert a line below", opts = { nowait = false } }, -- split and join lines ["jj"] = { " join ", "join lines" }, -- do something useful with the arrows [""] = { " move-2", "Move line up", opts = { expr = true } }, [""] = { " move+", "Move line down", opts = { expr = true } }, [""] = { "<<", "Less indentation", opts = { expr = true } }, [""] = { ">>", "More indentation", opts = { expr = true } }, -- format with conform ["ff"] = { function() require("conform").format() end, "formatting", }, }, v = { [""] = { ""] = { ">gv", "More indentation" }, }, x = { [""] = { "move'<-2gv=gv", "Move line up", opts = { expr = true } }, [""] = { "move'<-2gv=gv", "Move line down", opts = { expr = true } }, }, t = { --big move [""] = { "", "big step down" }, [""] = { "", "big step down" }, }, } M.ui = { plugin = false, n = { -- toggle wrap ["tw"] = { function() vim.opt_local.wrap = not vim.wo.wrap vim.opt_local.breakindent = not vim.wo.breakindent if vim.wo.colorcolumn == "" then vim.opt_local.colorcolumn = tostring(vim.bo.textwidth) else vim.opt_local.colorcolumn = "" end end, "toggle wrap", }, }, } -- more keybinds! return M