local map = require('cosmic.utils').map local M = {} M.project_files = function() local opts = {} -- define here if you want to define something local ok = pcall(require('telescope.builtin').git_files, opts) if not ok then require('telescope.builtin').find_files(opts) end end M.init = function() -- navigation map('n', 'ff', 'lua require("cosmic.plugins.telescope.mappings").project_files()') map('n', 'fp', ':Telescope find_files') map('n', 'fk', ':Telescope buffers') map('n', 'fs', ':Telescope live_grep') map('n', 'fw', ':Telescope grep_string') -- git navigation map('n', 'ggc', ':Telescope git_commits') map('n', 'ggs', ':Telescope git_status') -- quickfix navigation map('n', 'cp', ':cprevzz') map('n', 'cn', ':cnextzz') -- buffer navigation map('n', 'bp', ':bprev') map('n', 'bn', ':bnext') -- tab navigation map('n', 'tp', ':tabprevious') map('n', 'tn', ':tabnext') end return M