Open sibouras opened 7 months ago
Can you give this PR a try? https://github.com/nvim-telescope/telescope.nvim/pull/2999
I wrote some unit tests (and ran them against Windows with github actions) for the function related to handling path_display here: https://github.com/nvim-telescope/telescope.nvim/pull/3013
I think I was able to fix the 'smart' option for path_display that was previously broken but I didn't find anything out of the ordinary for the 'shorten' and default '' option. Looks like I'll have to dust off my windows machine to debug this some more.
the smart
option works great now for the non git pickers, but git_files
and git_status
are still broken for smart
, shorten
and the default ''
and there's a weird behavior with git_status path_display={'smart'}
, it kinda works: the first time i run it the first result is bugged and files in the first level root directory like init.lua
and lazy-lock.json
are not supposed to be prefixed by ..\nvim\
here's a video to better show what's happening and maybe save you from touching windows:
Hmm... I starting to wonder if this is git setting related.
Doing git status
on Windows powershell gives me unix style paths.
This combined with the fact that vim.loop.cwd
gives me Windows path and the way we "carelessly" combined join them gives me a :Telescope git_status path_display={''}
like this
this is BEFORE 3b8399c (on c816406)
I'm not sure how it wasn't broken for you before.
the most recent plenary commit https://github.com/nvim-lua/plenary.nvim/pull/551 broke :Telescope git_status path_display={''}
on c816406, try using the commit before it
Ahh... nice find. I see the issue now I believe - although the plenary change complicates things a little despite it having the right intentions. Man windows paths are finicky 😅
tell me about it lol
Description
bofore 3b8399c
Telescope buffers path_display={'smart'}
used to show relative paths, now it shows absolute paths with tildeNeovim version
Operating system and version
windows 11
Telescope version / branch / rev
221778e
checkhealth telescope
Steps to reproduce
:Telescope buffers path_display={'smart'}
Expected behavior
Actual behavior
Minimal config