diff options
author | kylo252 <[email protected]> | 2022-01-03 15:49:07 +0100 |
---|---|---|
committer | kylo252 <[email protected]> | 2022-01-03 15:49:07 +0100 |
commit | e5aa8be8ce54097e4a34220cb2aad114e70f209b (patch) | |
tree | 15e0a3017358b15a0656b6d1f98d2638ae572095 /lua/lvim/core/telescope/custom-finders.lua | |
parent | 427ad868d404a254dcbc7d3950946dae0cf205de (diff) | |
parent | 21b41688ee8c5056ffbb2b07df141ce1ccb4b213 (diff) |
Merge branch 'rolling'
Diffstat (limited to 'lua/lvim/core/telescope/custom-finders.lua')
-rw-r--r-- | lua/lvim/core/telescope/custom-finders.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/lvim/core/telescope/custom-finders.lua b/lua/lvim/core/telescope/custom-finders.lua index 5ce1485c..18307fbd 100644 --- a/lua/lvim/core/telescope/custom-finders.lua +++ b/lua/lvim/core/telescope/custom-finders.lua @@ -82,4 +82,14 @@ function M.view_lunarvim_changelog() }):find() end +-- Smartly opens either git_files or find_files, depending on whether the working directory is +-- contained in a Git repo. +function M.find_project_files() + local ok = pcall(builtin.git_files) + + if not ok then + builtin.find_files() + end +end + return M |