nvim-telescope / telescope-file-browser.nvim

File Browser extension for telescope.nvim
MIT License
1.68k stars 92 forks source link

Indicator for modified files within git submodule directory? #353

Closed joehdodd closed 8 months ago

joehdodd commented 8 months ago

Is your feature request related to a problem? Please describe.

There's a project that I often work in that uses a git submodule to house common code. But I'm noticing that, when I make changes to files within the submodule, telescope-file-browser only shows the directory of the submodule as being modified, not the modified files within it. As this project has hundreds of files, I need a way to quickly visualize files within the submodule that have been modified. Currently, I don't see a way to achieve this with telescope-file-browser.

If this is possible and I've merely glossed over some configuration, then I'll promptly close this.

Thanks!

Describe the solution you'd like

When working in a project using a git submodule, it would be helpful to have an indication of which file in the submodule directory has changed, not just the directory itself.

Additional context

Here are some screenshots. The vim-sub-test directory shows modification, but the modified tested.ts file within the directory does not.

Screenshot 2024-01-10 at 9 44 46 PM Screenshot 2024-01-10 at 9 44 55 PM
jamestrew commented 8 months ago

Thanks, I think this is actually a bug. If you can try out the PR to fix this that'll be great (#356).

joehdodd commented 8 months ago

Yes, that fixed it. Thank you!

Screenshot 2024-01-13 at 12 39 04 PM Screenshot 2024-01-13 at 12 39 08 PM
joehdodd commented 8 months ago

Although, now I'm in my nvim config repo and I'm seeing two "~" next to a file. Is it possible the changes in the submodule branch are causing that, or is it a different issue?

(Or even an expected behavior?)

Screenshot 2024-01-13 at 2 59 28 PM
jamestrew commented 8 months ago

The ~~ is technically a valid status you could see. Can you do git status --porcelain -- . in that directory? If you see something like MM lazy-lock.json (specifically two Ms), then that's actually expected behavior (git status --help has the meaning of it). If not, it's probably a bug. Although I might need some help with reproducing that on my end so I can see wants happening.