TelescopeMapArgs = TelescopeMapArgs or {} local map_tele = function(key, f, options, buffer) local map_key = vim.api.nvim_replace_termcodes(key .. f, true, true, true) TelescopeMapArgs[map_key] = options or {} local mode = "n" local rhs = string.format("lua R('alpha.telescope')['%s'](TelescopeMapArgs['%s'])", f, map_key) local map_options = { noremap = true, silent = true, } if not buffer then vim.api.nvim_set_keymap(mode, key, rhs, map_options) else vim.api.nvim_buf_set_keymap(0, mode, key, rhs, map_options) end end -- not shure what this line does vim.api.nvim_set_keymap("c", "", "(TelescopeFuzzyCommandSearch)", { noremap = false, nowait = true }) map_tele("pp", "project_files") map_tele("gc", "branches") map_tele("gt", "worktree") map_tele("pw", "grep_word") map_tele("ps", "grep_string") map_tele("pf", "projectionist") map_tele("rc", "search_config") map_tele("ph", "help_tags") map_tele("pe", "buffers") map_tele("pr", "treesitter") map_tele("bb", "file_browser") map_tele("gs", "git_status") map_tele("gt", "git_worktree") map_tele("ve", "diagnostics") map_tele("fp", "my_plugins") map_tele("pa", "laravel") map_tele("vca", "lsp_code_actions") return map_tele