telescope-repo.nvim
telescope-repo.nvim copied to clipboard
Cannot find intended projects
I tried following the FAQ on the topic to no avail. Here is my plugin file using lazy.nvim:
return {
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>")
require("telescope").setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
repo = {
list = {
search_dirs = {
"~/Projects",
"~/.config",
},
},
},
},
})
end,
},
{
"nvim-telescope/telescope-ui-select.nvim",
config = function()
require("telescope").load_extension("ui-select")
end,
},
{
"cljoly/telescope-repo.nvim",
config = function()
require("telescope").load_extension("repo")
end,
},
{
"airblade/vim-rooter",
config = function()
vim.g.rooter_patterns = { "src", ".git", "package.json", "Cargo.toml" }
end,
},
}
It does find a few projects in the Projects directory, however the only projects it recognizes are submodules of git repos. Top level git repos are ignored regardless of whether they have submodules or not.
I'm assuming that this is due to a mistake on my part as opposed as a bug.
Thanks for filling this issue!
This is actually a bug, due to this breaking change from fd:
Breaking: .git/ is now ignored by default when using --hidden / -H, use --no-ignore / -I or --no-ignore-vcs to override, see #1387 and #1396
So the .git folder we look for in the list command is now ignored by fd. And so we find only .git files in submodules.
You can try to use Telescope repo cached_list, I’ll work on a fix when I get time.
This should be solved with #69. Feel free to reopen if you encounter further issues after updating to the latest master though.