From df579bac425e4b6b69a0c8e694b154610cd5420b Mon Sep 17 00:00:00 2001 From: anott03 Date: Wed, 14 Jul 2021 13:25:00 -0400 Subject: refactor: move from telescope.path to plenary.path (#473) This will deprecate telescope.path, we will remove it soon. Please move over to plenary.path Co-authored-by: Simon Hauser --- lua/telescope/path.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lua/telescope/path.lua') diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua index 0d17c1a..f69fca6 100644 --- a/lua/telescope/path.lua +++ b/lua/telescope/path.lua @@ -1,6 +1,7 @@ +local log = require('telescope.log') + local path = {} --- TODO: Can we use vim.loop for this? path.separator = package.config:sub(1, 1) path.home = vim.fn.expand("~") @@ -86,4 +87,9 @@ path.read_file_async = function(filepath, callback) end) end -return path +return setmetatable({}, { + __index = function(_, k) + log.error("telescope.path is deprecated. please use plenary.path instead") + return path[k] + end +}) -- cgit v1.2.3