nvim-telescope/telescope.nvim

Add a path_display strategy that replaces home directory with tilde

bluss opened this issue · 0 comments

bluss commented

Absolute paths show up in in file search / grep in some contexts.

It would improve legibility if /home/foouser was replaced with ~ in file search results in these cases. Add a strategy that can be configured for path_display that does this substitution. Preferably in a way so that it can be composed with shorten or other path display functions.

Before:

/home/foouser/.local/lib/python3.20/site-packages/numpy/__init__.py

After:

~/.local/lib/python3.20/site-packages/numpy/__init__.py