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

feature: ability to use cwd as project root rather than only .git #155

Open
GLaDOS-418 opened this issue May 3, 2024 · 1 comment
Open

Comments

@GLaDOS-418
Copy link

The feature to use cwd to create project is required so that projects can be created for non-git project structures. There are other plugins which have more sophisticated logic to recognize the project root and set it as pwd. The project root determination can be delegated to those. one such example is: airblade/vim-rooter

  1. there are many version control systems {e.g. .git, .svn, .hg}
  2. there are git submodules. {.git inside .git}
  3. sometimes there are multiple git repos which collectively form one project, the root of which is denoted by an arbitrarily chosen special file {e.g. .root}.
  4. sometimes within one repo, there could be multiple smaller subprojects... and more.
@myarcana
Copy link
Contributor

Use

require("telescope._extensions.project.actions").add_project_cwd()

to add the effective current-directory as a project root, or

---@type string
local full_path = ... -- your own path-finding logic

require("telescope._extensions.project.actions").add_project_path(full_path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants