local M = {} local telescope = require("telescope") M.project_files = function() local opts = require('telescope.themes').get_ivy({}) -- define here if you want to define something opts["show_untracked"] = true opts["layout_config"] = {height=0.2} local ok = pcall(require"telescope.builtin".git_files, opts) if not ok then require"telescope.builtin".find_files(opts) end end local actions = require("telescope.actions") require("telescope").setup{ defaults = { mappings = { i = { ["jj"] = actions.close }, }, } } telescope.load_extension('fzf') vim.api.nvim_set_keymap("n", "", "lua require'telescope_config'.project_files()", {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "", "Telescope buffers theme=ivy", { silent = true, noremap = true }) vim.api.nvim_set_keymap("n", "", "lua require('telescope.builtin').live_grep{ cwd = vim.fn.systemlist(\"git rev-parse --show-toplevel 2> /dev/null || pwd\")[1] }", { silent = true, noremap = true }) return M