summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNazeeh ElDirghami <32499832+Nazeehe@users.noreply.github.com>2021-07-16 08:20:25 -0700
committerGitHub <noreply@github.com>2021-07-16 17:20:25 +0200
commit138697980b68ce7d4f0661c752691ffe5dbb72b0 (patch)
tree1584c4697ed8025abaaa01e01c7d794f7e439ca8 /doc
parent37a3a68a78e15900254ae5d9d4f9f0b5100a1735 (diff)
feat: Add ability to have a user defined function to format the path display (#1000)
Diffstat (limited to 'doc')
-rw-r--r--doc/telescope.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/telescope.txt b/doc/telescope.txt
index 06815c8..bdd25b3 100644
--- a/doc/telescope.txt
+++ b/doc/telescope.txt
@@ -181,6 +181,15 @@ telescope.setup({opts}) *telescope.setup()*
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
+ the path display. Example:
+
+ -- Format path as "file.txt (path\to\file\)"
+ path_display = function(opts, path)
+ local tail = require("telescope.utils").path_tail(path)
+ return string.format("%s (%s)", tail, path)
+ end,
+
Default: {}
*telescope.defaults.prompt_prefix*