Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find intended projects #68

Closed
SleeplessOne1917 opened this issue Jan 4, 2024 · 2 comments
Closed

Cannot find intended projects #68

SleeplessOne1917 opened this issue Jan 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SleeplessOne1917
Copy link

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.

@cljoly
Copy link
Owner

cljoly commented Jan 14, 2024

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.

@cljoly cljoly added the bug Something isn't working label Jan 14, 2024
@cljoly cljoly pinned this issue Jan 14, 2024
@crivotz crivotz mentioned this issue Mar 5, 2024
@cljoly
Copy link
Owner

cljoly commented Mar 15, 2024

This should be solved with #69. Feel free to reopen if you encounter further issues after updating to the latest master though.

@cljoly cljoly closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants