nvim-telescope / telescope-project.nvim

MIT License
598 stars 53 forks source link

How to save any subdirectory? #65

Open yoshida-m-3 opened 3 years ago

yoshida-m-3 commented 3 years ago

I want to create a Frontend orBackend project with the following directory structure.

However, when I try to create it, a MainProject is created. When I try to create it again, Project added [path] / MainProject is displayed and I cannot create it.

What should I do

MainProject
  - .git
  - Frontend
    - ...
  - Backend
    - ...
tiagovla commented 3 years ago

I would also want this feature. In the meantime I'm manually changing $HOME/.local/share/nvim/telescope-projects.txt.

matu3ba commented 3 years ago

This is due to the plugin looking for the git root folder by checking upwards until a .git folder exists taken from plenary. Changing this would either mean 1. complicating the plugin or 2. not providing the upwards search as "breaking change" on default, which forces users to check themself or use proper and explicit function arguments.

I think 2 would be the better option, but requires to provide users with commands :Project_isGit and for completion also the git worktree commands :Project_isPlainand :Project_isWorktree with corresponding functions.