Closed qualious closed 3 years ago
Hmm this look like it's not really related to vim-bookmarks, i.e. some of Telescope's builtin pickers could also benefit from this, right? Maybe you should actually try to add this to the main Telescope repo?
Just a general remark, try to not mix whitespace/indentation-related changes with actual code changes, it makes the diff harder to read and review.
It's not related to vim-bookmarks but to this extension itself. I agree that Telescope can benefit from some similar logic but this doesn't handle all the edge cases (I covered as much as I can) and I'm not ready for that PR to Telescope.
Sorry for the formatting thing. I understand it makes it hard to follow but since there isn't a set formatter configuration I figured it's open to interpretation.
As it is, it works. If you want, you can merge it. If not, we can wait for Telescope to eventually release something like this.
No problem, I wasn't saying that you shouldn't change the formatting in general, just that it should be a separate commit (see git add -p
).
Tbh I think (like you said) that this would be useful for Telescope in general. Maybe @tjdevries or @Conni2461 can take a look at this? Hope I'm not annoying them by randomly tagging them here 😬
There is currently a effort in telescope core which tries to unify the whole filename
/path
"transforming" into a util function. That way extensions could also profit from that. This PR could be added to that util function as well that way everyone can profit easily :)
See https://github.com/nvim-telescope/telescope.nvim/pull/839
Ah perfect, I'd go with that approach then and close this PR here for now.
Instead of showing either file name or shortened path given by telescope I've decided to implement a custom file name finder which behaves as such:
given files
it shows
Please feel free to modify the code.