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

Global telescope-repo configuration #38

Closed
Chetan496 opened this issue May 30, 2022 · 7 comments
Closed

Global telescope-repo configuration #38

Chetan496 opened this issue May 30, 2022 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Chetan496
Copy link

Hi All

I am trying to configure telescope-repo. I want to set the fd_opts and search_dirs in telescope configuration. I tried, but the configuration is not working.

Please find the snippet from my init.lua

require("telescope").load_extension("file_browser")
require("telescope").load_extension("repo")

require("telescope").setup {
  extensions = {
     repo = {
	list = {
          fd_opts = {
           "--no-ignore-vcs",
          },
          search_dirs = {
           "~/my_projects"
          }

	}     
     }
  }
}

require("telescope").setup {
  extensions = {
	list = {
          fd_opts = {
           "--no-ignore-vcs",
          },
          search_dirs = {
           "~/my_projects"
          }

	}     
  }
}

I tried the below snippet as well

require("telescope").setup {
  extensions = {
     repo = {
	
          fd_opts = {
           "--no-ignore-vcs",
          },
          search_dirs = {
           "~/my_projects"
          }

     }
  }
}

Both are not working.
Some context: my $HOME dir is under Git. But not every subdir under $HOME is under git. The my_projects is a separate directory which contains subdirectories each of which is a Git repo.

Any idea what is wrong?

@Chetan496 Chetan496 changed the title Help on Help on configuring telescope-repo May 30, 2022
@Chetan496
Copy link
Author

@cljoly - please help

@cljoly
Copy link
Owner

cljoly commented May 30, 2022

I don't think that this is supported, but I wouldn't mind adding that feature

@cljoly cljoly changed the title Help on configuring telescope-repo Global telescope-repo configuration May 30, 2022
@cljoly
Copy link
Owner

cljoly commented May 30, 2022

I should be able to take a deeper look in the next few days

@Chetan496
Copy link
Author

Thanks. Meanwhile I will map the lua command for Telescope repo list with fd options and use that

@cljoly cljoly self-assigned this May 30, 2022
@cljoly cljoly pinned this issue May 30, 2022
@cljoly cljoly added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 2, 2022
@cljoly
Copy link
Owner

cljoly commented Jun 2, 2022

I think that defining a custom setup entry in the table that the extension returns to telescope when initialized should work. I’ll have a PR soon.

@Chetan496
Copy link
Author

I think that defining a custom setup entry in the table that the extension returns to telescope when initialized should work. I’ll have a PR soon.

That's great!

@cljoly
Copy link
Owner

cljoly commented Jun 4, 2022

#41 should solve your problem (I’ve a fixed version of your snippet as an example: https://github.com/cljoly/telescope-repo.nvim/pull/41/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R109).

@cljoly cljoly mentioned this issue Jun 4, 2022
@cljoly cljoly closed this as completed in 9b42c5b Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants