feat: Add length option for shorten_path (#886)
* feat: add `shorten_len` option for path shortening
- adds option to configure the length of shortened parts of filenames
- only affects paths when "shorten" is in `path_display`
* chore: revert rebase for `path.lua` to 876bed9
* refactor: replace `shorten_len` with the `shorten` key in `path_display`
- also deprecates `utils.path_shorten` and passes straight to `plenary`s `Path:shorten`
* feat: allow `path_display` to handle table keys, as well as strings
This commit is contained in:
@@ -179,6 +179,15 @@ telescope.setup({opts}) *telescope.setup()*
|
||||
- "shorten" only display the first character of each directory in
|
||||
the path
|
||||
|
||||
You can also specify the number of characters of each directory name
|
||||
to keep by setting `path_display.shorten = num`.
|
||||
e.g. for a path like
|
||||
`alpha/beta/gamma/delta.txt`
|
||||
setting `path_display.shorten = 1` will give a path like:
|
||||
`a/b/g/delta.txt`
|
||||
Similarly, `path_display.shorten = 2` will give a path like:
|
||||
`al/be/ga/delta.txt`
|
||||
|
||||
path_display can also be set to 'hidden' string to hide file names
|
||||
|
||||
path_display can also be set to a function for custom formatting of
|
||||
|
||||
Reference in New Issue
Block a user