-- map the key (sequence) to a command local function map(mode, lhs, rhs, opts) local options = { noremap = true } if opts then options = vim.tbl_extend("force", options, opts) end vim.api.nvim_set_keymap(mode, lhs, rhs, options) end -- open terminal map("n", "ott", ":ToggleTerm") map("n", "otf", ":ToggleTerm direction=float") map("n", "otv", ":ToggleTerm direction=vertical") -- exit terminal mode map("t", "", "") -- open tree map("n", "op", ":NvimTreeToggle") -- telescope map("n", "to", ":Telescope") map("n", "tf", ":Telescope find_files") map("n", "tg", ":Telescope live_grep") -- copilot map('i', '', 'copilot#Accept("")', {expr=true, silent=true}) -- neogit map('n', 'gg', ':Neogit') -- symbols outline map("n", "os", ":SymbolsOutline") -- leap map("n", "", ":lua require('leap').leap {}") map("n", "", ":lua require('leap').leap { backward = true }") -- pollen map("i", "", "◊") -- ayu toggle map("n", "", ":let ayucolor=\"dark\":colorscheme ayu") map("n", "", ":let ayucolor=\"light\":colorscheme ayu")