Something went wrong. Try again.
Dotfiles V2 with Chezmoi
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647require("telescope").load_extension("dap")require("telescope").load_extension("ui-select")require("telescope").load_extension("rest")
local M = {}
M.toggle_telescope = function(harpoon_files) -- telescope function for harpoon local conf = require("telescope.config").values
local file_paths = {} for _, item in ipairs(harpoon_files.items) do table.insert(file_paths, item.value) end require("telescope.pickers") .new({}, { prompt_title = "Harpoon", finder = require("telescope.finders").new_table({ results = file_paths, }), previewer = conf.file_previewer({}), sorter = conf.generic_sorter({}), }) :find()end
-- we cache the results of "git rev-parse"local is_inside_work_tree = {}
M.project_files = function() local opts = {} -- define here if you want to define something
local cwd = vim.fn.getcwd() if is_inside_work_tree[cwd] == nil then vim.fn.system("git rev-parse --is-inside-work-tree") is_inside_work_tree[cwd] = vim.v.shell_error == 0 end
if is_inside_work_tree[cwd] then require("telescope.builtin").git_files(opts) else require("telescope.builtin").find_files(opts) endend
return M