From 4c46d468595d28d92bf340256e6cbbc3748ae6f0 Mon Sep 17 00:00:00 2001 From: Fabian Langguth Date: Mon, 4 Oct 2021 21:04:24 +0200 Subject: [PATCH] feat: use telescope builtin transform_path (#46) Telescope has changed the way how the options for path transform can be set. Use the appropriate new interface to transform the paths for display. --- lua/telescope/_extensions/frecency.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/telescope/_extensions/frecency.lua b/lua/telescope/_extensions/frecency.lua index 5321768..6e8274a 100644 --- a/lua/telescope/_extensions/frecency.lua +++ b/lua/telescope/_extensions/frecency.lua @@ -49,13 +49,7 @@ local function format_filepath(filename, opts) end end - if opts.tail_path then - filename = utils.path_tail(filename) - elseif opts.shorten_path then - filename = utils.path_shorten(filename) - end - - return filename + return utils.transform_path(opts, filename) end local function get_workspace_tags()