Open patricorgi opened 9 months ago
You are correct, at the moment the plugin only relies on .git
and .gitmodules
of the current working directory.
In your scenario we'd be looking to implement something similar to this stackoverflow question.
I suggest the below:
find_subdirectories = {
enabled = false,
depth = 1
}
Will this cover your use case? Do you see anything else to add?
Totally. Thanks for replying and considering my suggestion. I actually forked your repo and make it independent of .git
and .gitmodules
in the root directory. It simply replaces the git submodule for each
with a short bash snippet to print the exact same content. This may not be the most elegant way, so feel free to suggest anything else. I'm new to the lua language, so I didn't make it to support options of different settings.
Sorry, I also removed the previewer part to make the telescope appear faster, because what I really want is to display the repos and their branches, and be able to open any of them in lazygit
as fast as possible. Speaking of speed, my another suggestion, if it is not something too difficult, would be to make it async, so I don't have to wait for the entire list to be created until the telescope prompt can be displayed.
Wow, this is great feedback and suggestions. Thank yo very much.
I will slowly start working on the suggested changes in my comment above. Shouldn't take too long, but I don't have too much free time these days.
Sorry, I also removed the previewer part to make the telescope appear faster, because what I really want is to display the repos and their branches, and be able to open any of them in lazygit as fast as possible.
This makes a lot of sense. I created a branch to add a config parameter to enable/disable the previewer. I will test it tomorrow on my work machine.
Edit: This is now tested an added to main
Speaking of speed, my another suggestion, if it is not something too difficult, would be to make it async, so I don't have to wait for the entire list to be created until the telescope prompt can be displayed.
I like the idea, I also think the logic I wrote could be a little bit more efficient (e.g. the crazy if elseif
statement) to generate the submodule list.
I created a new branch and PR #5 for this feature, @patricorgi would you mind testing/reviewing it?
Hi, many thanks for implementing this! I saw your message a week ago, but I have been too busy recently to test it. Hopefully I can find sometime this week...
My workspace is a bit untypical. The root directory is not a git repo, but provides commands to automate
git clone
andmake
several interdependent projects with specified branch name of the repo of these projects.For instance, when I
make
ProjectC, which depends on ProjectA and ProjectB, the root repo will performgit clone
and set properCMAKE_PREFIX_PATH
to compile ProjectC. However, the cloned ProjectA/B/C are not really submodules to the root repo.At the moment, this plugins does not work in my workspace as it relies on
.git
and.gitmodules
if I understand it correctly. I'm wondering if it's possible to make it also work for my case?