nvim-telescope / telescope-project.nvim

MIT License
598 stars 53 forks source link

Allow creating project based on file location of buffer opened in #151

Open hardenedapple opened 6 months ago

hardenedapple commented 6 months ago

My use case is that I sometimes open up a few files in some other project to make a small change or view what's going on, then after a while decide I want to create a project for the repo that file is in. AFAICS there is no way to request "create a project based on current buffer directory".

I could use :lcd %:h before opening telescope-project, but would appreciate the more streamlined approach. That said, I recognise that creating a project is not the most common operation.

N.b. an alternative that would also work for me would be to be able to start telescope-project in a specified directory. E.g. for the find_files picker I can map to builtin.find_files({ cwd = vim.fn.expand('%:p:h') }) in order to open up telescope searching from the directory of the current buffer.