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', '', { callback = require('cosmic.plugins.telescope.mappings').project_files, desc = 'Find files', }) map('n', 'fp', ':Telescope find_files', { desc = 'Find project file' }) map('n', 'fk', ':Telescope buffers', { desc = 'Find buffer' }) map('n', 'fs', ':Telescope live_grep', { desc = 'Grep string' }) map('n', 'fw', ':Telescope grep_string', { desc = 'Grep current word' }) -- git navigation map('n', 'vtc', ':Telescope git_commits', { desc = 'Git commits' }) map('n', 'vts', ':Telescope git_status', { desc = 'Git status' }) end return M